Package sfs3.client.requests.game
Class QuickJoinGameRequest
java.lang.Object
sfs3.client.requests.BaseRequest
sfs3.client.requests.game.QuickJoinGameRequest
- All Implemented Interfaces:
sfs3.client.requests.IClientRequest
Quickly joins the current user in a public game.
By providing a matching expression and a list of Rooms or Groups, SmartFoxServer can search for a matching public Game Room and immediately join the user into that Room as a player.
If a game could be found and joined, the roomJoin event is dispatched to the requester's client.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class sfs3.client.requests.BaseRequest
AddBuddy, AdminMessage, AutoJoin, BanUser, BanUsersFromRoom, BlockBuddy, CallExtension, ChangeRoomCapacity, ChangeRoomName, ChangeRoomPassword, ClusterInviteUsers, ClusterJoinOrCreate, CreateRoom, CreateSFSGame, FindRooms, FindUsers, GameServerConnectionRequired, GenericMessage, GetRoomList, GoOnline, Handshake, InitBuddyList, InvitationReply, InviteUser, JoinRoom, JoinRoomInvite, KEY_ERROR_CODE, KEY_ERROR_PARAMS, KickUser, LeaveRoom, Login, Logout, ManualDisconnection, ModeratorMessage, ObjectMessage, PingPong, PlayerToSpectator, PrivateMessage, PublicMessage, QuickJoinGame, QuickJoinOrCreateRoom, RemoveBuddy, SetBuddyVariables, SetRoomVariables, SetUserPosition, SetUserVariables, sfso, SpectatorToPlayer, SubscribeRoomGroup, targetController, UdpInit, UnsubscribeRoomGroup -
Constructor Summary
ConstructorsConstructorDescriptionQuickJoinGameRequest(MatchExpression matchExpression, List<?> whereToSearch) QuickJoinGameRequest(MatchExpression matchExpression, List<?> whereToSearch, Room roomToLeave) Creates a new QuickJoinGameRequest instance. -
Method Summary
Methods inherited from class sfs3.client.requests.BaseRequest
getId, getRequest, getTargetController, getTransportType, setId, setTargetController, setTransportType
-
Field Details
-
KEY_ROOM_LIST
- See Also:
- Internal
-
KEY_GROUP_LIST
- See Also:
- Internal
-
KEY_ROOM_TO_LEAVE
- See Also:
- Internal
-
KEY_MATCH_EXPRESSION
- See Also:
- Internal
-
-
Constructor Details
-
QuickJoinGameRequest
public QuickJoinGameRequest(MatchExpression matchExpression, List<?> whereToSearch, Room roomToLeave) Creates a new QuickJoinGameRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.- Parameters:
matchExpression- A matching expression that the system will use to search a Game Room where to join the current user.whereToSearch- An array of Room objects or an array of Group names to which the matching expression should be applied. The maximum number of elements that this array can contain is 32.roomToLeave- A Room object representing the Room that the user should leave when joining the game.- See Also:
-
QuickJoinGameRequest
- See Also:
-
-
Method Details
-
validate
- Throws:
SFSValidationException- Internal
-
execute
- Internal
-