Class ChangeRoomCapacityRequest
- All Implemented Interfaces:
sfs3.client.requests.IClientRequest
If the operation is successful, the roomCapacityChange event is dispatched to all the users who subscribed the Group to which the target Room belongs, including the requester user himself. If the user is not the creator (owner) of the Room the roomCapacityChangeError event is fired. An administrator or moderator can override this constraint (he is not requested to be the Room's owner).
In case the Room's capacity is reduced to a value less than the current number of users/spectators inside the Room, exceeding users are NOT disconnected.
If the Room was configured so that resizing is not allowed (see the RoomSettings.permissions parameter), the request is ignored and no error is fired.
Also note that some restrictions are applied to the passed values (i.e. a client can't set the max users to more than 200, or the max spectators to more than 32).
- See Also:
-
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionChangeRoomCapacityRequest(Room room, int newMaxUsers, int newMaxSpect) Creates a new ChangeRoomCapacityRequest instance. -
Method Summary
Methods inherited from class sfs3.client.requests.BaseRequest
getId, getRequest, getTargetController, getTransportType, setId, setTargetController, setTransportType
-
Field Details
-
KEY_ROOM
- See Also:
- Internal
-
KEY_USER_SIZE
- See Also:
- Internal
-
KEY_SPEC_SIZE
- See Also:
- Internal
-
-
Constructor Details
-
ChangeRoomCapacityRequest
Creates a new ChangeRoomCapacityRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.- Parameters:
room- The Room object corresponding to the Room whose capacity should be changed.newMaxUsers- The new maximum number of users/players who can join the Room;newMaxSpect- The new maximum number of spectators who can join the Room (for Game Rooms only);- See Also:
-
-
Method Details
-
validate
- Throws:
SFSValidationException- Internal
-
execute
- Internal
-