Package sfs2x.client.requests.cluster
Class ClusterJoinOrCreateRequest
- java.lang.Object
-
- sfs2x.client.requests.BaseRequest
-
- sfs2x.client.requests.cluster.ClusterJoinOrCreateRequest
-
- All Implemented Interfaces:
sfs2x.client.requests.IRequest
public class ClusterJoinOrCreateRequest extends BaseRequest
Creates a new ClusterJoinOrCreateRequest instance.See constructors for all the details.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
KEY_GROUP_LIST
* API internal usage only *static java.lang.String
KEY_INVITATION_EXPIRY
* API internal usage only *static java.lang.String
KEY_INVITATION_PARAMS
* API internal usage only *static java.lang.String
KEY_INVITED_PLAYERS
* API internal usage only *static java.lang.String
KEY_IS_PUBLIC
* API internal usage only *static java.lang.String
KEY_MATCH_EXPRESSION
* API internal usage only *static java.lang.String
KEY_MIN_PLAYERS
* API internal usage only *static java.lang.String
KEY_NOTIFY_GAME_STARTED
* API internal usage only *static java.lang.String
KEY_ROOM_SETTINGS
* API internal usage only *-
Fields inherited from class sfs2x.client.requests.BaseRequest
AddBuddy, AdminMessage, AutoJoin, BanUser, 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, SpectatorToPlayer, SubscribeRoomGroup, UnsubscribeRoomGroup
-
-
Constructor Summary
Constructors Constructor Description ClusterJoinOrCreateRequest(MatchExpression matchExpression)
Creates a new ClusterJoinOrCreateRequest instance.ClusterJoinOrCreateRequest(MatchExpression matchExpression, java.util.List<java.lang.String> groupNames)
Creates a new ClusterJoinOrCreateRequest instance.ClusterJoinOrCreateRequest(MatchExpression matchExpression, java.util.List<java.lang.String> groupNames, RoomSettings settings)
Creates a new ClusterJoinOrCreateRequest instance.ClusterJoinOrCreateRequest(RoomSettings settings)
Creates a new ClusterJoinOrCreateRequest instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(ISmartFox sfs)
void
validate(ISmartFox sfs)
-
Methods inherited from class sfs2x.client.requests.BaseRequest
getId, getMessage, getTargetController, isEncrypted, setEncrypted, setId, setTargetController
-
-
-
-
Field Detail
-
KEY_GROUP_LIST
public static final java.lang.String KEY_GROUP_LIST
* API internal usage only *- See Also:
- Constant Field Values
-
KEY_ROOM_SETTINGS
public static final java.lang.String KEY_ROOM_SETTINGS
* API internal usage only *- See Also:
- Constant Field Values
-
KEY_MATCH_EXPRESSION
public static final java.lang.String KEY_MATCH_EXPRESSION
* API internal usage only *- See Also:
- Constant Field Values
-
KEY_IS_PUBLIC
public static final java.lang.String KEY_IS_PUBLIC
* API internal usage only *- See Also:
- Constant Field Values
-
KEY_MIN_PLAYERS
public static final java.lang.String KEY_MIN_PLAYERS
* API internal usage only *- See Also:
- Constant Field Values
-
KEY_INVITED_PLAYERS
public static final java.lang.String KEY_INVITED_PLAYERS
* API internal usage only *- See Also:
- Constant Field Values
-
KEY_INVITATION_EXPIRY
public static final java.lang.String KEY_INVITATION_EXPIRY
* API internal usage only *- See Also:
- Constant Field Values
-
KEY_NOTIFY_GAME_STARTED
public static final java.lang.String KEY_NOTIFY_GAME_STARTED
* API internal usage only *- See Also:
- Constant Field Values
-
KEY_INVITATION_PARAMS
public static final java.lang.String KEY_INVITATION_PARAMS
* API internal usage only *- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ClusterJoinOrCreateRequest
public ClusterJoinOrCreateRequest(MatchExpression matchExpression, java.util.List<java.lang.String> groupNames, RoomSettings settings)
Creates a new ClusterJoinOrCreateRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.The Lobby will search for a game Room that meets the desire criteria via the provided MatchExpression. If none is found it will proceed by creating a new Game Room, if the passes settings parameter is not null.
You can also skip the search entirely and force the Lobby to create the Room on the next available Game Node, by passing a null MatchExpression or by using the specialized constructor.
- Parameters:
matchExpression
- A match expression to filter RoomsgroupNames
- List of group names to further filter the search, if null all groups will be searchedsettings
- If no Rooms are found a new Room with the passed settings will be created and the User will auto-join it.- See Also:
SmartFox.send(sfs2x.client.requests.IRequest)
,ClusterRoomSettings
,User
,SFSObject
-
ClusterJoinOrCreateRequest
public ClusterJoinOrCreateRequest(MatchExpression matchExpression, java.util.List<java.lang.String> groupNames)
Creates a new ClusterJoinOrCreateRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.The Lobby will search for a game Room that meets the desire criteria via the provided MatchExpression.
- Parameters:
matchExpression
- A match expression to filter RoomsgroupNames
- List of group names to further filter the search, if null all groups will be searched- See Also:
SmartFox.send(sfs2x.client.requests.IRequest)
,RoomSettings
,User
,SFSObject
-
ClusterJoinOrCreateRequest
public ClusterJoinOrCreateRequest(MatchExpression matchExpression)
Creates a new ClusterJoinOrCreateRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.The Lobby will search for a game Room that meets the desire criteria via the provided MatchExpression.
- Parameters:
matchExpression
- A match expression to filter Rooms- See Also:
SmartFox.send(sfs2x.client.requests.IRequest)
,User
,SFSObject
-
ClusterJoinOrCreateRequest
public ClusterJoinOrCreateRequest(RoomSettings settings)
Creates a new ClusterJoinOrCreateRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.The Lobby will create a game Room based on the provided settings on the next available GameNode.
- Parameters:
settings
- The room configuration settings- See Also:
SmartFox.send(sfs2x.client.requests.IRequest)
,RoomSettings
,User
,SFSObject
-
-
Method Detail
-
validate
public void validate(ISmartFox sfs) throws sfs2x.client.exceptions.SFSValidationException
- Throws:
sfs2x.client.exceptions.SFSValidationException
-
execute
public void execute(ISmartFox sfs) throws com.smartfoxserver.v2.exceptions.SFSException
- Throws:
com.smartfoxserver.v2.exceptions.SFSException
-
-