Package sfs3.client.requests
Class RoomSettings
java.lang.Object
sfs3.client.requests.RoomSettings
- Direct Known Subclasses:
MMORoomSettings,SFSGameSettings
The RoomSettings class is a container for the settings required to
create a Room using the CreateRoomRequest request.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanSpecifies if the Room allows "Join Room" Invitations sent by any User or just by its ownerDefines the flags indicating which events related to the Room are dispatched by the SmartFox client.Defines the Extension that must be attached to the Room on the server-side, and its settings.Defines the id of the Group to which the Room should belong.intDefines the maximum number of spectators allowed in the Room (only for Game Rooms).intDefines the maximum number of users allowed in the Room.intDefines the maximum number of Room Variables allowed for the Room.getName()Defines the name of the Room.Defines the password of the Room.Defines the flags indicating which operations are permitted on the Room.Defines a list of RooomVariable objects to be attached to the Room.booleanisGame()Indicates whether the Room is a Game Room or not.setAllowOwnerOnlyInvitation(boolean value) Specifies if the Room allows "Join Room" Invitations sent by any User or just by its ownersetEvents(RoomEvents events) setExtension(RoomExtension extension) setGame(boolean game) setGroupId(String groupId) setMaxSpectators(int maxSpectators) setMaxUsers(int maxUsers) setMaxVariables(int maxVariables) voidvoidsetPassword(String password) setPermissions(RoomPermissions permissions) setVariables(List<RoomVariable> variables)
-
Constructor Details
-
RoomSettings
Creates a new RoomSettings instance. The instance must be passed to the CreateRoomRequest class constructor.- Parameters:
name- The name of the Room to be created.- See Also:
-
-
Method Details
-
getName
Defines the name of the Room. -
setName
- See Also:
-
getPassword
Defines the password of the Room. If the password is set to an empty string, the Room won't be password protected.The default value is an empty string.
-
setPassword
- See Also:
-
isGame
public boolean isGame()Indicates whether the Room is a Game Room or not. The default value isfalse -
setGame
- See Also:
-
getMaxUsers
public int getMaxUsers()Defines the maximum number of users allowed in the Room. In case of Game Rooms, this is the maximum number of players. The default value is10- See Also:
-
setMaxUsers
- See Also:
-
getMaxVariables
public int getMaxVariables()Defines the maximum number of Room Variables allowed for the Room. The default value is5 -
setMaxVariables
- See Also:
-
getMaxSpectators
public int getMaxSpectators()Defines the maximum number of spectators allowed in the Room (only for Game Rooms). The default value is0- See Also:
-
setMaxSpectators
- See Also:
-
getVariables
Defines a list of RooomVariable objects to be attached to the Room. The default value isnull- See Also:
-
setVariables
- See Also:
-
getPermissions
Defines the flags indicating which operations are permitted on the Room.Permissions include: name and password change, maximum users change and public messaging. If set to
The default value isnull, the permissions configured on the server-side are used (see the SmartFoxServer 3 Administration Tool documentation).null -
setPermissions
- See Also:
-
getEvents
Defines the flags indicating which events related to the Room are dispatched by the SmartFox client.Room events include: users entering or leaving the room, user count change and user variables update. If set to
The default value isnull, the events configured on the server-side are used (see the SmartFoxServer 3 Administration Tool documentation).null -
setEvents
- See Also:
-
getExtension
Defines the Extension that must be attached to the Room on the server-side, and its settings. -
setExtension
- See Also:
-
getGroupId
Defines the id of the Group to which the Room should belong. If the Group doesn't exist yet, a new one is created before assigning the Room to it. The default value isdefault- See Also:
-
setGroupId
- See Also:
-
allowOwnerOnlyInvitation
public boolean allowOwnerOnlyInvitation()Specifies if the Room allows "Join Room" Invitations sent by any User or just by its ownerDefault = true (only the creator is allowed to send invitations)
- Since:
- 1.7.0
- See Also:
-
setAllowOwnerOnlyInvitation
Specifies if the Room allows "Join Room" Invitations sent by any User or just by its ownerDefault = true (only the creator is allowed to send invitations)
- Since:
- 1.7.0
- See Also:
-