|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Room
| Method Summary | |
|---|---|
void |
addUser(User user)
|
void |
addUser(User user,
boolean asSpectator)
|
boolean |
containsProperty(java.lang.Object key)
|
boolean |
containsUser(java.lang.String name)
Checks if the specified User is joined in the Room |
boolean |
containsUser(User user)
Checks if the specified User is joined in the Room |
boolean |
containsVariable(java.lang.String varName)
Checks if a certain Room Variable name exists |
SFSRoomRemoveMode |
getAutoRemoveMode()
Return the auto-remove mode of the Room |
int |
getCapacity()
Return the capacity of the Room (maximum number of clients that can be contained). |
java.lang.String |
getDump()
Get a dump of all Room attributes/settings. |
ISFSExtension |
getExtension()
Get the extension connected to this Room, if any |
java.lang.String |
getGroupId()
Get the Room Group Id. |
int |
getId()
Return the unique Room Id |
long |
getLifeTime()
Obtain the time of existence of the Room |
int |
getMaxRoomVariablesAllowed()
Return the maximum number of Room Variables allowed in the Room. |
int |
getMaxSpectators()
Return the maximum number of Spectators allowed in the Room. |
int |
getMaxUsers()
Return the maximum number of Users allowed in the Room. |
java.lang.String |
getName()
Get the room name |
User |
getOwner()
Get the owner of the Room (the user that created it) |
java.lang.String |
getPassword()
Get the Room password. |
java.util.List<User> |
getPlayersList()
For Game Rooms: get all Players in the Room (same as all User without the Spectators) |
java.lang.Object |
getProperty(java.lang.Object key)
|
ISFSArray |
getRoomVariablesData(boolean globalsOnly)
|
java.util.List<ISession> |
getSessionList()
Get all the User Sessions in the Room |
RoomSize |
getSize()
Return the current Room size |
java.util.List<User> |
getSpectatorsList()
For Game Rooms: get all Spectators in the Room (same as all User without the Players) |
User |
getUserById(int id)
|
User |
getUserByName(java.lang.String name)
|
User |
getUserByPlayerId(int playerId)
Get the User currently having the specified playerId (Game Room only) |
User |
getUserBySession(ISession session)
|
java.util.List<User> |
getUserList()
Get all Users in the Room |
ISFSArray |
getUserListData()
|
com.smartfoxserver.v2.entities.managers.IUserManager |
getUserManager()
|
RoomVariable |
getVariable(java.lang.String varName)
Get a Room Variable |
java.util.List<RoomVariable> |
getVariables()
Get the full list of Room Variables in the Room |
int |
getVariablesCount()
Get the total amount of Room Variables for this Room |
java.util.List<RoomVariable> |
getVariablesCreatedByUser(User user)
Get a list of Room Variables created by a specific User |
Zone |
getZone()
Get the Zone managing this Room. |
boolean |
isActive()
Return true if the Room is active in the Zone. |
boolean |
isDynamic()
Checks if the Room was created dynamically (at runtime) |
boolean |
isEmpty()
Checks whether the Room is empty |
boolean |
isFlagSet(SFSRoomSettings flag)
Checks whether a certain Room Setting is set |
boolean |
isFull()
Checks whether the Room is full. |
boolean |
isGame()
Checks if this is a Game Room |
boolean |
isHidden()
Checks if the Game is hidden. |
boolean |
isPasswordProtected()
Checks if the Room requires a password for joining it |
boolean |
isPublic()
Returns true if the Room has public access, in other words it doesn't require a password. |
boolean |
isUseWordsFilter()
Check if the word filter is used in this Room (applied to Public Messages) |
void |
removeProperty(java.lang.Object key)
|
void |
removeUser(User user)
|
void |
removeVariable(java.lang.String varName)
|
java.util.List<RoomVariable> |
removeVariablesCreatedByUser(User user)
|
void |
setActive(boolean flag)
|
void |
setAutoRemoveMode(SFSRoomRemoveMode mode)
|
void |
setCapacity(int maxUser,
int maxSpectators)
|
void |
setDynamic(boolean b)
|
void |
setExtension(ISFSExtension extension)
|
void |
setFlag(SFSRoomSettings flag,
boolean state)
|
void |
setFlags(java.util.Set<SFSRoomSettings> settings)
|
void |
setGame(boolean b)
|
void |
setGame(boolean b,
java.lang.Class<? extends IPlayerIdGenerator> customPlayerIdGeneratorClass)
|
void |
setGroupId(java.lang.String group)
|
void |
setHidden(boolean b)
|
void |
setMaxRoomVariablesAllowed(int max)
|
void |
setMaxSpectators(int max)
|
void |
setMaxUsers(int max)
|
void |
setName(java.lang.String name)
|
void |
setOwner(User user)
|
void |
setPassword(java.lang.String password)
|
void |
setProperty(java.lang.Object key,
java.lang.Object value)
|
void |
setUserManager(com.smartfoxserver.v2.entities.managers.IUserManager manager)
|
void |
setUseWordsFilter(boolean useWordsFilter)
Toggle the word filter in this Room (applied to Public Messages) |
void |
setVariable(RoomVariable roomVariable)
|
void |
setVariable(RoomVariable roomVariable,
boolean overridOwnership)
|
void |
setVariables(java.util.List<RoomVariable> variables)
|
void |
setVariables(java.util.List<RoomVariable> variables,
boolean overridOwnership)
|
void |
setZone(Zone zone)
|
void |
switchPlayerToSpectator(User user)
|
void |
switchSpectatorToPlayer(User user)
|
ISFSArray |
toSFSArray(boolean globalVarsOnly)
|
| Method Detail |
|---|
int getId()
java.lang.String getGroupId()
void setGroupId(java.lang.String group)
java.lang.String getName()
void setName(java.lang.String name)
java.lang.String getPassword()
isPasswordProtected()void setPassword(java.lang.String password)
boolean isPasswordProtected()
boolean isPublic()
int getCapacity()
void setCapacity(int maxUser,
int maxSpectators)
int getMaxUsers()
void setMaxUsers(int max)
int getMaxSpectators()
void setMaxSpectators(int max)
int getMaxRoomVariablesAllowed()
void setMaxRoomVariablesAllowed(int max)
User getOwner()
void setOwner(User user)
RoomSize getSize()
RoomSizecom.smartfoxserver.v2.entities.managers.IUserManager getUserManager()
void setUserManager(com.smartfoxserver.v2.entities.managers.IUserManager manager)
Zone getZone()
void setZone(Zone zone)
boolean isDynamic()
boolean isGame()
boolean isHidden()
void setDynamic(boolean b)
void setGame(boolean b)
void setGame(boolean b,
java.lang.Class<? extends IPlayerIdGenerator> customPlayerIdGeneratorClass)
void setHidden(boolean b)
void setFlags(java.util.Set<SFSRoomSettings> settings)
void setFlag(SFSRoomSettings flag,
boolean state)
boolean isFlagSet(SFSRoomSettings flag)
flag - the flag
SFSRoomSettingsSFSRoomRemoveMode getAutoRemoveMode()
SFSRoomRemoveModevoid setAutoRemoveMode(SFSRoomRemoveMode mode)
boolean isEmpty()
boolean isFull()
boolean isActive()
void setActive(boolean flag)
ISFSExtension getExtension()
void setExtension(ISFSExtension extension)
RoomVariable getVariable(java.lang.String varName)
varName - the name of the variable
SFSRoomVariablejava.util.List<RoomVariable> getVariables()
void setVariable(RoomVariable roomVariable,
boolean overridOwnership)
throws SFSVariableException
SFSVariableException
void setVariable(RoomVariable roomVariable)
throws SFSVariableException
SFSVariableException
void setVariables(java.util.List<RoomVariable> variables,
boolean overridOwnership)
void setVariables(java.util.List<RoomVariable> variables)
java.util.List<RoomVariable> getVariablesCreatedByUser(User user)
user - the User
java.util.List<RoomVariable> removeVariablesCreatedByUser(User user)
void removeVariable(java.lang.String varName)
boolean containsVariable(java.lang.String varName)
varName - the variable name
int getVariablesCount()
java.lang.Object getProperty(java.lang.Object key)
void setProperty(java.lang.Object key,
java.lang.Object value)
boolean containsProperty(java.lang.Object key)
void removeProperty(java.lang.Object key)
User getUserById(int id)
id - the User id
User getUserByName(java.lang.String name)
name - the User name
User getUserBySession(ISession session)
session - the User session
User getUserByPlayerId(int playerId)
playerId - the player id
java.util.List<User> getUserList()
java.util.List<User> getPlayersList()
java.util.List<User> getSpectatorsList()
java.util.List<ISession> getSessionList()
ISFSArray getUserListData()
ISFSArray getRoomVariablesData(boolean globalsOnly)
void addUser(User user,
boolean asSpectator)
throws SFSJoinRoomException
SFSJoinRoomException
void addUser(User user)
throws SFSJoinRoomException
SFSJoinRoomExceptionvoid removeUser(User user)
boolean containsUser(User user)
user - the User
boolean containsUser(java.lang.String name)
name - the User name
ISFSArray toSFSArray(boolean globalVarsOnly)
void switchPlayerToSpectator(User user)
throws SFSRoomException
SFSRoomException
void switchSpectatorToPlayer(User user)
throws SFSRoomException
SFSRoomExceptionboolean isUseWordsFilter()
void setUseWordsFilter(boolean useWordsFilter)
useWordsFilter - long getLifeTime()
java.lang.String getDump()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||