sfs2x.client.requests
Class RoomSettings

java.lang.Object
  extended by sfs2x.client.requests.RoomSettings
Direct Known Subclasses:
MMORoomSettings, SFSGameSettings

public class RoomSettings
extends java.lang.Object

The RoomSettings class is a container for the settings required to create a Room using the CreateRoomRequest request.

See Also:
CreateRoomRequest, Room

Constructor Summary
RoomSettings(java.lang.String name)
          Creates a new RoomSettings instance.
 
Method Summary
 boolean allowOwnerOnlyInvitation()
          Specifies if the Room allows "Join Room" Invitations sent by any User or just by its owner Default = true (only the creator is allowed to send invitations)
 RoomEvents getEvents()
          Defines the flags indicating which events related to the Room are dispatched by the SmartFox client.
 RoomExtension getExtension()
          Defines the Extension that must be attached to the Room on the server-side, and its settings.
 java.lang.String getGroupId()
          Defines the id of the Group to which the Room should belong.
 int getMaxSpectators()
          Defines the maximum number of spectators allowed in the Room (only for Game Rooms).
 int getMaxUsers()
          Defines the maximum number of users allowed in the Room.
 int getMaxVariables()
          Defines the maximum number of Room Variables allowed for the Room.
 java.lang.String getName()
          Defines the name of the Room.
 java.lang.String getPassword()
          Defines the password of the Room.
 RoomPermissions getPermissions()
          Defines the flags indicating which operations are permitted on the Room.
 java.util.List<RoomVariable> getVariables()
          Defines a list of RooomVariable objects to be attached to the Room.
 boolean isGame()
          Indicates whether the Room is a Game Room or not.
 void setAllowOwnerOnlyInvitation(boolean value)
          Specifies if the Room allows "Join Room" Invitations sent by any User or just by its owner Default = true (only the creator is allowed to send invitations)
 void setEvents(RoomEvents events)
           
 void setExtension(RoomExtension extension)
           
 void setGame(boolean game)
           
 void setGroupId(java.lang.String groupId)
           
 void setMaxSpectators(int maxSpectators)
           
 void setMaxUsers(int maxUsers)
           
 void setMaxVariables(int maxVariables)
           
 void setName(java.lang.String name)
           
 void setPassword(java.lang.String password)
           
 void setPermissions(RoomPermissions permissions)
           
 void setVariables(java.util.List<RoomVariable> variables)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoomSettings

public RoomSettings(java.lang.String name)
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:
CreateRoomRequest
Method Detail

getName

public java.lang.String getName()
Defines the name of the Room.


setName

public void setName(java.lang.String name)
See Also:
getName()

getPassword

public java.lang.String 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

public void setPassword(java.lang.String password)
See Also:
getPassword()

isGame

public boolean isGame()
Indicates whether the Room is a Game Room or not.

The default value is false


setGame

public void setGame(boolean game)
See Also:
isGame

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 is 10

See Also:
getMaxSpectators()

setMaxUsers

public void setMaxUsers(int maxUsers)
See Also:
getMaxUsers()

getMaxVariables

public int getMaxVariables()
Defines the maximum number of Room Variables allowed for the Room.

The default value is 5


setMaxVariables

public void setMaxVariables(int maxVariables)
See Also:
getMaxVariables()

getMaxSpectators

public int getMaxSpectators()
Defines the maximum number of spectators allowed in the Room (only for Game Rooms).

The default value is 0

See Also:
getMaxUsers()

setMaxSpectators

public void setMaxSpectators(int maxSpectators)
See Also:
getMaxSpectators()

getVariables

public java.util.List<RoomVariable> getVariables()
Defines a list of RooomVariable objects to be attached to the Room.

The default value is null

See Also:
RoomVariable

setVariables

public void setVariables(java.util.List<RoomVariable> variables)
See Also:
getVariables()

getPermissions

public RoomPermissions 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 null, the permissions configured on the server-side are used (see the SmartFoxServer 2X Administration Tool documentation).

The default value is null


setPermissions

public void setPermissions(RoomPermissions permissions)
See Also:
getPermissions()

getEvents

public RoomEvents 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 null, the events configured on the server-side are used (see the SmartFoxServer 2X Administration Tool documentation).

The default value is null


setEvents

public void setEvents(RoomEvents events)
See Also:
getEvents()

getExtension

public RoomExtension getExtension()
Defines the Extension that must be attached to the Room on the server-side, and its settings.


setExtension

public void setExtension(RoomExtension extension)
See Also:
getExtension()

getGroupId

public java.lang.String 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 is default

See Also:
Room.getGroupId()

setGroupId

public void setGroupId(java.lang.String groupId)
See Also:
getGroupId()

allowOwnerOnlyInvitation

public boolean allowOwnerOnlyInvitation()
Specifies if the Room allows "Join Room" Invitations sent by any User or just by its owner

Default = true (only the creator is allowed to send invitations)

Since:
1.7.0
See Also:
JoinRoomInvitationRequest

setAllowOwnerOnlyInvitation

public void setAllowOwnerOnlyInvitation(boolean value)
Specifies if the Room allows "Join Room" Invitations sent by any User or just by its owner

Default = true (only the creator is allowed to send invitations)

Since:
1.7.0
See Also:
JoinRoomInvitationRequest