public interface SocketClient
Modifier and Type | Method and Description |
---|---|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
acceptParty(@NonNull java.lang.String partyId,
UserPresence userPresence)
Accept a member to a party.
|
com.google.common.util.concurrent.ListenableFuture<MatchmakerTicket> |
addMatchmaker()
Join the matchmaker pool and search for opponents on the server.
|
com.google.common.util.concurrent.ListenableFuture<MatchmakerTicket> |
addMatchmaker(int minCount)
Join the matchmaker pool and search for opponents on the server.
|
com.google.common.util.concurrent.ListenableFuture<MatchmakerTicket> |
addMatchmaker(int minCount,
int maxCount)
Join the matchmaker pool and search for opponents on the server.
|
com.google.common.util.concurrent.ListenableFuture<MatchmakerTicket> |
addMatchmaker(int minCount,
int maxCount,
java.lang.String query)
Join the matchmaker pool and search for opponents on the server.
|
com.google.common.util.concurrent.ListenableFuture<MatchmakerTicket> |
addMatchmaker(int minCount,
int maxCount,
java.lang.String query,
java.util.Map<java.lang.String,java.lang.String> stringProperties)
Join the matchmaker pool and search for opponents on the server.
|
com.google.common.util.concurrent.ListenableFuture<MatchmakerTicket> |
addMatchmaker(int minCount,
int maxCount,
java.lang.String query,
java.util.Map<java.lang.String,java.lang.String> stringProperties,
java.util.Map<java.lang.String,java.lang.Double> numericProperties)
Join the matchmaker pool and search for opponents on the server.
|
com.google.common.util.concurrent.ListenableFuture<PartyMatchmakerTicket> |
addPartyMatchmaker(@NonNull java.lang.String partyId,
int minCount,
int maxCount,
@NonNull java.lang.String query,
java.util.Map<java.lang.String,java.lang.String> stringProperties,
java.util.Map<java.lang.String,java.lang.Double> numericProperties,
int countMultiple)
Begin matchmaking as a party.
|
com.google.common.util.concurrent.ListenableFuture<Party> |
closeParty(@NonNull java.lang.String partyId)
End a party.
|
com.google.common.util.concurrent.ListenableFuture<Session> |
connect(@NonNull Session session,
@NonNull SocketListener listener)
Connect to the server.
|
com.google.common.util.concurrent.ListenableFuture<Session> |
connect(@NonNull Session session,
@NonNull SocketListener listener,
boolean createStatus)
Connect to the server.
|
com.google.common.util.concurrent.ListenableFuture<Match> |
createMatch()
Create a multiplayer match on the server.
|
com.google.common.util.concurrent.ListenableFuture<Party> |
createParty(boolean open,
int maxSize)
Create a party.
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
disconnect()
Close the connection with the server.
|
com.google.common.util.concurrent.ListenableFuture<Status> |
followUsers(java.util.List<java.lang.String> userIds,
java.lang.String... usernames)
Follow one or more users for status updates.
|
com.google.common.util.concurrent.ListenableFuture<Status> |
followUsers(java.lang.String... userIds)
Follow one or more users for status updates.
|
com.google.common.util.concurrent.ListenableFuture<Channel> |
joinChat(@NonNull java.lang.String target,
@NonNull ChannelType type)
Join a chat channel on the server.
|
com.google.common.util.concurrent.ListenableFuture<Channel> |
joinChat(@NonNull java.lang.String target,
@NonNull ChannelType type,
boolean persistence)
Join a chat channel on the server.
|
com.google.common.util.concurrent.ListenableFuture<Channel> |
joinChat(@NonNull java.lang.String target,
@NonNull ChannelType type,
boolean persistence,
boolean hidden)
Join a chat channel on the server.
|
com.google.common.util.concurrent.ListenableFuture<Match> |
joinMatch(@NonNull java.lang.String matchId)
Join a multiplayer match by ID.
|
com.google.common.util.concurrent.ListenableFuture<Match> |
joinMatch(@NonNull java.lang.String matchId,
@NonNull java.util.Map<java.lang.String,java.lang.String> metadata)
Join a multiplayer match by ID.
|
com.google.common.util.concurrent.ListenableFuture<Match> |
joinMatchToken(@NonNull java.lang.String token)
Join a multiplayer match with a matchmaker.
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
joinParty(@NonNull java.lang.String partyId)
Join a party.
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
leaveChat(@NonNull java.lang.String channelId)
Leave a chat channel on the server.
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
leaveMatch(@NonNull java.lang.String matchId)
Leave a match on the server.
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
leaveParty(@NonNull java.lang.String partyId)
Leave a party.
|
com.google.common.util.concurrent.ListenableFuture<PartyJoinRequest> |
listPartyJoinRequest(@NonNull java.lang.String partyId)
Lists pending join requests for a party.
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
promoteParty(@NonNull java.lang.String partyId,
UserPresence userPresence)
Promote a member to party leader.
|
com.google.common.util.concurrent.ListenableFuture<ChannelMessageAck> |
removeChatMessage(@NonNull java.lang.String channelId,
@NonNull java.lang.String messageId)
Remove a chat message from a channel on the server.
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
removeMatchmaker(@NonNull java.lang.String ticket)
Leave the matchmaker pool by ticket.
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
removeParty(@NonNull java.lang.String partyId,
UserPresence userPresence)
Remove/reject a member from a party.
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
removePartyMatchmaker(@NonNull java.lang.String partyId,
@NonNull java.lang.String ticket)
Cancel a party matchmaking process using a ticket.
|
com.google.common.util.concurrent.ListenableFuture<Rpc> |
rpc(@NonNull java.lang.String id)
Send an RPC message to the server.
|
com.google.common.util.concurrent.ListenableFuture<Rpc> |
rpc(@NonNull java.lang.String id,
java.lang.String payload)
Send an RPC message to the server.
|
void |
sendMatchData(@NonNull java.lang.String matchId,
long opCode,
@NonNull byte[] data)
Send a state change to a match on the server.
|
void |
sendMatchData(@NonNull java.lang.String matchId,
long opCode,
@NonNull byte[] data,
UserPresence... presences)
Send a state change to a match on the server.
|
void |
sendPartyData(@NonNull java.lang.String partyId,
int opCode,
@NonNull byte[] data)
Send party data.
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
unfollowUsers(java.lang.String... userIds)
Unfollow status updates for one or more users.
|
com.google.common.util.concurrent.ListenableFuture<ChannelMessageAck> |
updateChatMessage(@NonNull java.lang.String channelId,
@NonNull java.lang.String messageId,
@NonNull java.lang.String content)
Update a chat message to a channel on the server.
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
updateStatus(java.lang.String status)
Update the user's status online.
|
com.google.common.util.concurrent.ListenableFuture<ChannelMessageAck> |
writeChatMessage(@NonNull java.lang.String channelId,
@NonNull java.lang.String content)
Send a chat message to a channel on the server.
|
com.google.common.util.concurrent.ListenableFuture<Session> connect(@NonNull @NonNull Session session, @NonNull @NonNull SocketListener listener)
session
- The session of the user.listener
- An event listener to notify on updates.com.google.common.util.concurrent.ListenableFuture<Session> connect(@NonNull @NonNull Session session, @NonNull @NonNull SocketListener listener, boolean createStatus)
session
- The session of the user.listener
- An event listener to notify on updates.createStatus
- True if the socket should show the user as online to others.com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> disconnect()
com.google.common.util.concurrent.ListenableFuture<Channel> joinChat(@NonNull @NonNull java.lang.String target, @NonNull @NonNull ChannelType type)
target
- The target channel to join.type
- The type of channel to join.com.google.common.util.concurrent.ListenableFuture<Channel> joinChat(@NonNull @NonNull java.lang.String target, @NonNull @NonNull ChannelType type, boolean persistence)
target
- The target channel to join.type
- The type of channel to join.persistence
- True if chat messages should be stored.com.google.common.util.concurrent.ListenableFuture<Channel> joinChat(@NonNull @NonNull java.lang.String target, @NonNull @NonNull ChannelType type, boolean persistence, boolean hidden)
target
- The target channel to join.type
- The type of channel to join.persistence
- True if chat messages should be stored.hidden
- True if the user should be hidden on the channel.com.google.common.util.concurrent.ListenableFuture<java.lang.Void> leaveChat(@NonNull @NonNull java.lang.String channelId)
channelId
- The channel to leave.com.google.common.util.concurrent.ListenableFuture<ChannelMessageAck> removeChatMessage(@NonNull @NonNull java.lang.String channelId, @NonNull @NonNull java.lang.String messageId)
channelId
- The chat channel with the message.messageId
- The ID of a chat message to update.com.google.common.util.concurrent.ListenableFuture<ChannelMessageAck> writeChatMessage(@NonNull @NonNull java.lang.String channelId, @NonNull @NonNull java.lang.String content)
channelId
- The channel to send on.content
- The content of the chat message.com.google.common.util.concurrent.ListenableFuture<ChannelMessageAck> updateChatMessage(@NonNull @NonNull java.lang.String channelId, @NonNull @NonNull java.lang.String messageId, @NonNull @NonNull java.lang.String content)
channelId
- The ID of the chat channel with the message.messageId
- The ID of the message to update.content
- The content update for the message.com.google.common.util.concurrent.ListenableFuture<Match> createMatch()
com.google.common.util.concurrent.ListenableFuture<Match> joinMatch(@NonNull @NonNull java.lang.String matchId)
matchId
- A match ID.com.google.common.util.concurrent.ListenableFuture<Match> joinMatch(@NonNull @NonNull java.lang.String matchId, @NonNull @NonNull java.util.Map<java.lang.String,java.lang.String> metadata)
matchId
- A match ID.metadata
- An optional set of key-value metadata pairs to be passed to the match handler, if any.com.google.common.util.concurrent.ListenableFuture<Match> joinMatchToken(@NonNull @NonNull java.lang.String token)
token
- A matchmaker ticket result object.com.google.common.util.concurrent.ListenableFuture<java.lang.Void> leaveMatch(@NonNull @NonNull java.lang.String matchId)
matchId
- The match to leave.com.google.common.util.concurrent.ListenableFuture<MatchmakerTicket> addMatchmaker()
com.google.common.util.concurrent.ListenableFuture<MatchmakerTicket> addMatchmaker(int minCount)
minCount
- The minimum number of players to compete against.com.google.common.util.concurrent.ListenableFuture<MatchmakerTicket> addMatchmaker(int minCount, int maxCount)
minCount
- The minimum number of players to compete against.maxCount
- The maximum number of players to compete against.com.google.common.util.concurrent.ListenableFuture<MatchmakerTicket> addMatchmaker(int minCount, int maxCount, java.lang.String query)
query
- A matchmaker query to search for opponents.minCount
- The minimum number of players to compete against.maxCount
- The maximum number of players to compete against.com.google.common.util.concurrent.ListenableFuture<MatchmakerTicket> addMatchmaker(int minCount, int maxCount, java.lang.String query, java.util.Map<java.lang.String,java.lang.String> stringProperties)
query
- A matchmaker query to search for opponents.minCount
- The minimum number of players to compete against.maxCount
- The maximum number of players to compete against.stringProperties
- A set of k/v properties to provide in searches.com.google.common.util.concurrent.ListenableFuture<MatchmakerTicket> addMatchmaker(int minCount, int maxCount, java.lang.String query, java.util.Map<java.lang.String,java.lang.String> stringProperties, java.util.Map<java.lang.String,java.lang.Double> numericProperties)
query
- A matchmaker query to search for opponents.minCount
- The minimum number of players to compete against.maxCount
- The maximum number of players to compete against.stringProperties
- A set of k/v properties to provide in searches.numericProperties
- A set of k/v numeric properties to provide in searches.com.google.common.util.concurrent.ListenableFuture<java.lang.Void> removeMatchmaker(@NonNull @NonNull java.lang.String ticket)
ticket
- The ticket returned by the matchmaker on join. See IMatchmakerTicket.Ticket.void sendMatchData(@NonNull @NonNull java.lang.String matchId, long opCode, @NonNull @NonNull byte[] data)
matchId
- The Id of the match.opCode
- An operation code for the match state.data
- The new state to send to the match.void sendMatchData(@NonNull @NonNull java.lang.String matchId, long opCode, @NonNull @NonNull byte[] data, UserPresence... presences)
matchId
- The Id of the match.opCode
- An operation code for the match state.data
- The new state to send to the match.presences
- The presences in the match to send the state.com.google.common.util.concurrent.ListenableFuture<Rpc> rpc(@NonNull @NonNull java.lang.String id)
id
- The ID of the function to execute.com.google.common.util.concurrent.ListenableFuture<Rpc> rpc(@NonNull @NonNull java.lang.String id, java.lang.String payload)
id
- The ID of the function to execute.payload
- The string content to send to the server.com.google.common.util.concurrent.ListenableFuture<Status> followUsers(@NonNull java.lang.String... userIds)
userIds
- The user Ids to follow.com.google.common.util.concurrent.ListenableFuture<Status> followUsers(java.util.List<java.lang.String> userIds, java.lang.String... usernames)
userIds
- The user Ids to follow.usernames
- Usernames to follow.com.google.common.util.concurrent.ListenableFuture<java.lang.Void> unfollowUsers(@NonNull java.lang.String... userIds)
userIds
- The ids of users to unfollow.com.google.common.util.concurrent.ListenableFuture<java.lang.Void> updateStatus(java.lang.String status)
status
- The new status of the user.com.google.common.util.concurrent.ListenableFuture<Party> createParty(boolean open, int maxSize)
open
- Whether the party will require join requests to be approved by the party leader.maxSize
- Maximum number of party members.com.google.common.util.concurrent.ListenableFuture<java.lang.Void> joinParty(@NonNull @NonNull java.lang.String partyId)
partyId
- A party ID.com.google.common.util.concurrent.ListenableFuture<java.lang.Void> leaveParty(@NonNull @NonNull java.lang.String partyId)
partyId
- A party ID.com.google.common.util.concurrent.ListenableFuture<java.lang.Void> promoteParty(@NonNull @NonNull java.lang.String partyId, UserPresence userPresence)
partyId
- A party ID.userPresence
- The presence of an existing party member to promote as the new leader.com.google.common.util.concurrent.ListenableFuture<java.lang.Void> acceptParty(@NonNull @NonNull java.lang.String partyId, UserPresence userPresence)
partyId
- Party ID to accept a join request for.userPresence
- The presence to accept as a party member.com.google.common.util.concurrent.ListenableFuture<java.lang.Void> removeParty(@NonNull @NonNull java.lang.String partyId, UserPresence userPresence)
partyId
- Party ID to remove/reject from.userPresence
- The presence to remove or reject.com.google.common.util.concurrent.ListenableFuture<Party> closeParty(@NonNull @NonNull java.lang.String partyId)
partyId
- A party ID.com.google.common.util.concurrent.ListenableFuture<PartyJoinRequest> listPartyJoinRequest(@NonNull @NonNull java.lang.String partyId)
partyId
- A party ID.com.google.common.util.concurrent.ListenableFuture<PartyMatchmakerTicket> addPartyMatchmaker(@NonNull @NonNull java.lang.String partyId, int minCount, int maxCount, @NonNull @NonNull java.lang.String query, java.util.Map<java.lang.String,java.lang.String> stringProperties, java.util.Map<java.lang.String,java.lang.Double> numericProperties, int countMultiple)
minCount
- Minimum total user count to match together.maxCount
- Maximum total user count to match together.query
- Filter query used to identify suitable users.stringProperties
- A set of k/v properties to provide in searches.numericProperties
- A set of k/v numeric properties to provide in searches.countMultiple
- Optional multiple of the count that must be satisfied.com.google.common.util.concurrent.ListenableFuture<java.lang.Void> removePartyMatchmaker(@NonNull @NonNull java.lang.String partyId, @NonNull @NonNull java.lang.String ticket)
partyId
- A party ID.partyId
- The ticket to cancel.void sendPartyData(@NonNull @NonNull java.lang.String partyId, int opCode, @NonNull @NonNull byte[] data)
partyId
- The ID of the party.opCode
- An operation code for the party state.data
- The new state to send to the party.