public final class SFSZone extends java.lang.Object implements Zone
Also each Zone provides a number of essential services:
Room
,
SFSApi
,
BaseSFSExtension
,
SFSExtension
Constructor and Description |
---|
SFSZone(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addDisabledSystemEvent(java.lang.String eventID)
INTERNAL
|
void |
addRoom(Room room)
INTERNAL
Instead use
SFSApi.createRoom(Zone, CreateRoomSettings, User) |
void |
changeRoomCapacity(Room room,
int newMaxUsers,
int newMaxSpect)
|
void |
changeRoomName(Room room,
java.lang.String newName)
|
void |
changeRoomPasswordState(Room room,
java.lang.String password)
|
void |
checkAndRemove(Room room) |
boolean |
containsGroup(java.lang.String groupId)
Check if the Zone contains the specified Group
|
boolean |
containsProperty(java.lang.Object key)
Checks the existance of a Zone property
|
boolean |
containsPublicGroup(java.lang.String groupId)
Check if the Zone contains the specified public Group
|
Room |
createRoom(CreateRoomSettings params)
Use the
SFSApi.createRoom(Zone, CreateRoomSettings, User) method instead |
Room |
createRoom(CreateRoomSettings params,
User user)
Use the
SFSApi.createRoom(Zone, CreateRoomSettings, User) method instead |
com.smartfoxserver.v2.util.IAdminHelper |
getAdminHelper() |
BuddyListManager |
getBuddyListManager()
INTERNAL
Instead use
SFSBuddyApi |
IDBManager |
getDBManager()
Obtain a reference to the Zone's Database Manager.
|
java.util.List<java.lang.String> |
getDefaultGroups()
Get the list of Groups that each User will be automatically subscribed to when joining the Zone.
|
java.lang.String |
getDefaultPlayerIdGeneratorClassName() |
java.lang.String |
getDump() |
ISFSExtension |
getExtension()
INTERNAL
|
ISystemFilterChain |
getFilterChain(SystemRequest requestId)
Obtain a reference to the Zone's SystemFilterChain.
|
IFloodFilter |
getFloodFilter()
INTERNAL
|
int |
getGameRoomCount() |
java.util.Set<SFSRoomEvents> |
getGroupEvents(java.lang.String groupId) |
java.util.List<java.lang.String> |
getGroups()
Get the full list of Room Groups available in the Zone.
|
java.lang.String |
getGuestUserNamePrefix()
Get the prefix used by the system to auto-generate guest user names.
|
int |
getId()
A numeric ID used by the AdminTool.
|
int |
getMaxAllowedRooms()
The maximum number of Rooms that can be created in the Room.
|
int |
getMaxAllowedUsers()
The maximum number of users allowed to join the Zone.
|
int |
getMaxFailedLogins()
The max number of login attempts (in the same session) a user can fail before being disconnected.
|
int |
getMaxFindRoomResults()
Get the max number of "FindRoom" results for a client request.
|
int |
getMaxFindUserResults()
Get the max number of "Find User" results for a client request.
|
int |
getMaxInvitationsPerRequest()
Get the max number of people that can be invited a by a single client side JoinRoomInvitationRequest
|
int |
getMaxRoomNameChars()
The maximum number of characters allowed for a Room name
|
int |
getMaxRoomsCreatedPerUserLimit()
The maximum number of Rooms that a User can create at once.
|
int |
getMaxRoomVariablesAllowed()
The maximum number of Room Variables allowed for each Room.
|
int |
getMaxUserIdleTime()
Get the max allowed idle time for a User.
|
int |
getMaxUserVariablesAllowed()
The maximum number of User Variables allowed for each User.
|
int |
getMinRoomNameChars()
The minimum number of characters allowed for Room name
|
java.lang.String |
getName()
The name of the Zone.
|
PrivilegeManager |
getPrivilegeManager() |
java.lang.Object |
getProperty(java.lang.Object key)
Properties are custom values that can be added or removed from the Zone at run-time.
|
java.util.List<java.lang.String> |
getPublicGroups()
Get a list of names of the "Public" Room Groups available in the Zone.
|
Room |
getRoomById(int id)
Get a Room from its unique ID
|
Room |
getRoomByName(java.lang.String name)
Get a Room from its name
|
java.util.List<Room> |
getRoomList()
Get the list of Rooms in the Zone
|
ISFSArray |
getRoomListData()
INTERNAL
|
ISFSArray |
getRoomListData(java.util.List<java.lang.String> groupIds)
INTERNAL
|
java.util.List<Room> |
getRoomListFromGroup(java.lang.String groupId)
Get the list of Rooms from a specific Group
|
com.smartfoxserver.v2.entities.managers.IRoomManager |
getRoomManager()
Obtain a reference to the internal Room Manager
|
IRoomStorage |
getRoomPersistenceApi()
Obtain the Room Persistence API object.
|
java.util.Collection<ISession> |
getSessionList()
Get the list of Sessions logged in the Zone
|
java.util.Collection<ISession> |
getSessionsInGroup(java.lang.String groupId)
Get a list of Sessions from all Rooms in the provided Room Group
|
java.util.Collection<ISession> |
getSessionsListeningToGroup(java.lang.String groupId)
Get a list of Sessions listening for events in a specific Group
|
int |
getTotalRoomCount() |
com.smartfoxserver.v2.util.IResponseThrottler |
getUCountThrottler()
INTERNAL
|
User |
getUserById(int id)
Get a User from its unique ID
|
User |
getUserByName(java.lang.String name)
Get a User from its name
|
User |
getUserBySession(ISession session)
Get a User from its Session object
|
int |
getUserCount()
Get the current amount of Users connected to the Zone
|
int |
getUserCountChangeUpdateInterval()
Get the rate (in ms.) at which the UserCountUpdates events are fired to the clients.
|
java.util.Collection<User> |
getUserList()
Get the list of Users logged in the Zone
|
com.smartfoxserver.v2.entities.managers.IUserManager |
getUserManager() |
int |
getUserReconnectionSeconds()
Return the amount of seconds available for a User to reconnect to the system in case their socket connection goes
down.
|
java.util.Collection<User> |
getUsersInGroup(java.lang.String groupId)
Get a list of Users from all Rooms in the provided Room Group
|
IWordFilter |
getWordFilter()
INTERNAL
|
com.smartfoxserver.v2.entities.managers.IZoneManager |
getZoneManager() |
void |
initRoomPersistence(RoomStorageMode mode,
BaseStorageConfig config)
Initializes the Room Persistence functionality.
|
boolean |
isActive()
Checks if the Zone is currently enabled in the system or not.
|
boolean |
isAllowInvitationsOnlyForBuddies()
True if only buddies can be invited by a client side JoinRoomInvitationRequest, false otherwise.
|
boolean |
isClientAllowedToOverridRoomEvents()
Deprecated.
|
boolean |
isCustomLogin()
Check if the Zone fires LOGIN events to the Zone extension at login time.
|
boolean |
isEncrypted()
True if protocol cryptography is turned on in this Zone.
|
boolean |
isFilterBuddyMessages()
Toggle the filtering of Buddy messages via the Words Filter.
|
boolean |
isFilterChainInited()
Returns true if the FilterChain was initialized
|
boolean |
isFilterPrivateMessages()
If turned on the Zone will apply the Words Filter to private messages
|
boolean |
isFilterRoomNames()
If turned on the Zone will apply the Words Filter to Room names
|
boolean |
isFilterUserNames()
If turned on the Zone will apply the Words Filter to User names provided at login time
|
boolean |
isForceLogout()
If turned on it allows a User to connect from another location while another connection is already active.
|
boolean |
isGeoLocationEnabled()
Toggles geolocation for clients.
|
boolean |
isGroupEventSet(java.lang.String groupId,
SFSRoomEvents eventToCheck)
Checks whether a specific Room Event for the specified Group is active
|
boolean |
isGuestUserAllowed()
Check if the Zone allows guest users (those sending no name and no password).
|
boolean |
isHidden()
INTERNAL
|
boolean |
isSystemEventAllowed(java.lang.String eventID)
INTERNAL
|
boolean |
isUploadEnabled()
True if the Zone supports HTTP uploads.
|
User |
login(LoginData loginData)
|
void |
registerEventsForRoomGroup(java.lang.String groupId,
java.util.Set<SFSRoomEvents> flags)
|
void |
removeAllUsers() |
void |
removeDisabledSystemEvent(java.lang.String eventID)
INTERNAL
|
void |
removeProperty(java.lang.Object key)
Remove a property.
|
void |
removeRoom(int roomId)
|
void |
removeRoom(Room room)
|
void |
removeRoom(java.lang.String name)
|
void |
removeUser(int userId)
INTERNAL
Instead use
SFSApi.disconnectUser(User) |
void |
removeUser(ISession session)
INTERNAL
Instead use
SFSApi.disconnect(ISession) |
void |
removeUser(java.lang.String userName)
INTERNAL
Instead use
SFSApi.disconnectUser(User) |
void |
removeUser(User user)
INTERNAL
Instead use
SFSApi.disconnectUser(User) |
void |
removeUserFromRoom(User user,
Room room)
|
void |
resetSystemFilterChain()
Resets the whole SystemController Filter chain.
|
void |
setActive(boolean flag)
Changes the state of the Zone.
|
void |
setAdminHelper(com.smartfoxserver.v2.util.IAdminHelper adminHelper) |
void |
setAllowInvitationsOnlyForBuddies(boolean allowInvitationsOnlyForBuddies)
Set to true if only buddies can be invited by a client side JoinRoomInvitationRequest, false otherwise.
|
void |
setBuddyListManager(BuddyListManager buddyListManager)
INTERNAL
|
void |
setClientAllowedToOverridRoomEvents(boolean flag)
Deprecated.
|
void |
setCustomLogin(boolean flag)
Set the Zone as Custom login.
|
void |
setDBManager(IDBManager manager)
INTERNAL
|
void |
setDefaultGroups(java.util.List<java.lang.String> groupIDs) |
void |
setDefaultPlayerIdGeneratorClassName(java.lang.String className) |
void |
setEncrypted(boolean value)
Toggles the protocol cryptography.
|
void |
setExtension(ISFSExtension extension)
INTERNAL
|
void |
setFilterBuddyMessages(boolean flag)
If turned on the Zone will apply the Words Filter to Buddy messages
|
void |
setFilterChain(SystemRequest requestId,
ISystemFilterChain chain)
Set a SystemFilterChain for a specific SystemController's Request.
|
void |
setFilterPrivateMessages(boolean flag)
Toggle the filtering of private messages via the Words Filter.
|
void |
setFilterRoomNames(boolean flag)
Toggle the filtering of Room names via the Words Filter.
|
void |
setFilterUserNames(boolean flag)
Toggle the filtering of User names via the Words Filter at login time.
|
void |
setForceLogout(boolean flag)
If turned on it allows a User to connect from another location while another connection is already active.
|
void |
setGeoLocationEnabled(boolean value)
Toggles geolocation for clients.
|
void |
setGuestUserAllowed(boolean flag)
Toggles the Zone guest users (login with no name and no password).
|
void |
setGuestUserNamePrefix(java.lang.String prefix)
Set the prefix used by the system to auto-generate guest user names.
|
void |
setHidden(boolean flag)
INTERNAL
|
void |
setId(int id)
A numeric ID used by the AdminTool.
|
void |
setMaxAllowedRooms(int max)
Set the maximum number of Rooms that can be created in the Room.
|
void |
setMaxAllowedUsers(int max)
Set the maximum number of users allowed to join the Zone.
|
void |
setMaxFailedLogins(int value)
Set the max number of login attempts (in the same session) a user can fail before being disconnected.
|
void |
setMaxFindRoomResults(int value)
Set the max number of "FindRoom" results for a client request.
|
void |
setMaxFindUserResults(int value)
Set the max number of "FindUser" results for a client request.
|
void |
setMaxInvitationsPerRequest(int maxInvitationsPerRequest)
Set the max number of people that can be invited a by a single client side JoinRoomInvitationRequest
|
void |
setMaxRoomNameChars(int maxRoomNameChars)
Set the maximum number of characters allowed for a Room name
|
void |
setMaxRoomsCreatedPerUserLimit(int max)
Set the maximum number of Rooms that a User can create at once.
|
void |
setMaxRoomVariablesAllowed(int max)
Set the maximum number of Room variables allowed in the Room
|
void |
setMaxUserIdleTime(int seconds)
Set the max allowed idle time for a User.
|
void |
setMaxUserVariablesAllowed(int max)
Set the maximum number of User Variables allowed for each User.
|
void |
setMinRoomNameChars(int minRoomNameChars)
Set the minimum number of characters allowed for a Room name
|
void |
setPrivilegeManager(PrivilegeManager privilegeManager) |
void |
setProperty(java.lang.Object key,
java.lang.Object value)
Properties are custom values that can be added or removed from the Zone at run-time.
|
void |
setPublicGroups(java.util.List<java.lang.String> groupIDs) |
void |
setUploadEnabled(boolean val)
Switches on/off the ability to upload data via HTTP.
|
void |
setUserCountChangeUpdateInterval(int interval)
Set the rate (in ms.) at which the UserCountUpdates events are fired to the clients.
|
void |
setUserReconnectionSeconds(int seconds)
Set the amount of seconds available for a User to reconnect to the system in case their socket connection goes
down.
|
void |
setZoneManager(com.smartfoxserver.v2.entities.managers.IZoneManager manager) |
java.lang.String |
toString() |
void |
validateUserName(java.lang.String name) |
public com.smartfoxserver.v2.entities.managers.IRoomManager getRoomManager()
getRoomManager
in interface Zone
public com.smartfoxserver.v2.entities.managers.IUserManager getUserManager()
getUserManager
in interface Zone
public boolean containsGroup(java.lang.String groupId)
containsGroup
in interface Zone
public boolean containsPublicGroup(java.lang.String groupId)
containsPublicGroup
in interface Zone
public Room createRoom(CreateRoomSettings params, User user) throws SFSCreateRoomException
SFSApi.createRoom(Zone, CreateRoomSettings, User)
method insteadcreateRoom
in interface Zone
SFSCreateRoomException
public Room createRoom(CreateRoomSettings params) throws SFSCreateRoomException
SFSApi.createRoom(Zone, CreateRoomSettings, User)
method insteadcreateRoom
in interface Zone
SFSCreateRoomException
public void changeRoomName(Room room, java.lang.String newName) throws SFSRoomException
changeRoomName
in interface Zone
SFSRoomException
public void changeRoomPasswordState(Room room, java.lang.String password)
changeRoomPasswordState
in interface Zone
public void changeRoomCapacity(Room room, int newMaxUsers, int newMaxSpect)
changeRoomCapacity
in interface Zone
public void addDisabledSystemEvent(java.lang.String eventID)
Zone
addDisabledSystemEvent
in interface Zone
public void addRoom(Room room) throws SFSTooManyRoomsException
Zone
Instead use SFSApi.createRoom(Zone, CreateRoomSettings, User)
addRoom
in interface Zone
SFSTooManyRoomsException
public java.lang.String getGuestUserNamePrefix()
Example: by default the prefix is "Guest#"
At the end of the prefix it will be added the unique user id.
getGuestUserNamePrefix
in interface Zone
public int getUserCount()
getUserCount
in interface Zone
public int getTotalRoomCount()
getTotalRoomCount
in interface Zone
public int getGameRoomCount()
getGameRoomCount
in interface Zone
public int getMaxAllowedRooms()
getMaxAllowedRooms
in interface Zone
public int getMaxUserVariablesAllowed()
getMaxUserVariablesAllowed
in interface Zone
public int getMaxAllowedUsers()
getMaxAllowedUsers
in interface Zone
public int getMaxRoomsCreatedPerUserLimit()
Example: if the limit is == 3 and the User has created Rooms A, B and C he won't be able to create any more Room at least until any of these Rooms is destroyed.
getMaxRoomsCreatedPerUserLimit
in interface Zone
public java.lang.String getName()
public int getId()
public java.lang.Object getProperty(java.lang.Object key)
getProperty
in interface Zone
key
- the name of the propertypublic void removeProperty(java.lang.Object key)
removeProperty
in interface Zone
key
- the name of the property.Zone.setProperty(Object, Object)
public java.util.List<java.lang.String> getPublicGroups()
getPublicGroups
in interface Zone
public java.util.List<java.lang.String> getGroups()
public java.util.List<java.lang.String> getDefaultGroups()
getDefaultGroups
in interface Zone
SFSApi.subscribeRoomGroup(User, String)
public Room getRoomById(int id)
getRoomById
in interface Zone
id
- the Room idpublic Room getRoomByName(java.lang.String name)
getRoomByName
in interface Zone
name
- the Room namepublic java.util.List<Room> getRoomList()
getRoomList
in interface Zone
public java.util.List<Room> getRoomListFromGroup(java.lang.String groupId)
getRoomListFromGroup
in interface Zone
groupId
- the id of the grouppublic User getUserById(int id)
getUserById
in interface Zone
id
- the User IDpublic User getUserByName(java.lang.String name)
getUserByName
in interface Zone
name
- the User namepublic User getUserBySession(ISession session)
getUserBySession
in interface Zone
session
- the Sessionpublic int getUserCountChangeUpdateInterval()
A value of zero will use the default, real-time updating that was also present in SmartFoxServer 1.x In high traffic servers these updates could be thousands per second, so we highly recommend to use a slower update rate in order to optimize the network usage. Reasonable values can be in the range of 500ms - 2000ms
getUserCountChangeUpdateInterval
in interface Zone
public com.smartfoxserver.v2.util.IResponseThrottler getUCountThrottler()
Zone
getUCountThrottler
in interface Zone
public java.lang.String getDefaultPlayerIdGeneratorClassName()
getDefaultPlayerIdGeneratorClassName
in interface Zone
public void setDefaultPlayerIdGeneratorClassName(java.lang.String className)
setDefaultPlayerIdGeneratorClassName
in interface Zone
public boolean isUploadEnabled()
isUploadEnabled
in interface Zone
public void setUploadEnabled(boolean val)
SFSEventType.FILE_UPLOAD
event to be fired
at Zone Level.setUploadEnabled
in interface Zone
public boolean isFilterChainInited()
isFilterChainInited
in interface Zone
public void resetSystemFilterChain()
resetSystemFilterChain
in interface Zone
public boolean isHidden()
Zone
public void setHidden(boolean flag)
Zone
public ISystemFilterChain getFilterChain(SystemRequest requestId)
getFilterChain
in interface Zone
requestId
- the request id associated with the filter chainISystemFilterChain
,
ISystemFilter
public void setFilterChain(SystemRequest requestId, ISystemFilterChain chain)
setFilterChain
in interface Zone
requestId
- the SystemController request Idchain
- the filter chainSysControllerFilterChain
,
SysControllerFilter
public ISFSExtension getExtension()
getExtension
in interface Zone
public void setExtension(ISFSExtension extension)
Zone
setExtension
in interface Zone
public int getUserReconnectionSeconds()
getUserReconnectionSeconds
in interface Zone
public void setUserReconnectionSeconds(int seconds)
setUserReconnectionSeconds
in interface Zone
seconds
- the amount of seconds to reconnectpublic int getMaxUserIdleTime()
getMaxUserIdleTime
in interface Zone
public void setMaxUserIdleTime(int seconds)
setMaxUserIdleTime
in interface Zone
seconds
- the intervalpublic java.util.Collection<User> getUsersInGroup(java.lang.String groupId)
getUsersInGroup
in interface Zone
groupId
- a group Idpublic java.util.Collection<ISession> getSessionsInGroup(java.lang.String groupId)
getSessionsInGroup
in interface Zone
groupId
- a group Idpublic java.util.Collection<ISession> getSessionsListeningToGroup(java.lang.String groupId)
Zone
getSessionsListeningToGroup
in interface Zone
groupId
- a group Idpublic java.util.Collection<ISession> getSessionList()
getSessionList
in interface Zone
public java.util.Collection<User> getUserList()
getUserList
in interface Zone
public com.smartfoxserver.v2.entities.managers.IZoneManager getZoneManager()
getZoneManager
in interface Zone
public boolean isActive()
public boolean isClientAllowedToOverridRoomEvents()
isClientAllowedToOverridRoomEvents
in interface Zone
public boolean isCustomLogin()
isCustomLogin
in interface Zone
SFSEvent
,
SFSEventType
public boolean isForceLogout()
isForceLogout
in interface Zone
public boolean isGuestUserAllowed()
isGuestUserAllowed
in interface Zone
Zone.getGuestUserNamePrefix()
public boolean isSystemEventAllowed(java.lang.String eventID)
isSystemEventAllowed
in interface Zone
public boolean isFilterUserNames()
isFilterUserNames
in interface Zone
public boolean isFilterRoomNames()
isFilterRoomNames
in interface Zone
public void setFilterRoomNames(boolean flag)
setFilterRoomNames
in interface Zone
flag
- a booleanpublic boolean isFilterBuddyMessages()
isFilterBuddyMessages
in interface Zone
public void setFilterBuddyMessages(boolean flag)
setFilterBuddyMessages
in interface Zone
public boolean containsProperty(java.lang.Object key)
containsProperty
in interface Zone
key
- the name of the propertypublic void registerEventsForRoomGroup(java.lang.String groupId, java.util.Set<SFSRoomEvents> flags)
registerEventsForRoomGroup
in interface Zone
public boolean isGroupEventSet(java.lang.String groupId, SFSRoomEvents eventToCheck)
isGroupEventSet
in interface Zone
groupId
- the group nameeventToCheck
- the type of event to checkpublic java.util.Set<SFSRoomEvents> getGroupEvents(java.lang.String groupId)
getGroupEvents
in interface Zone
public void removeDisabledSystemEvent(java.lang.String eventID)
Zone
removeDisabledSystemEvent
in interface Zone
public void removeRoom(int roomId)
removeRoom
in interface Zone
public void removeRoom(java.lang.String name)
removeRoom
in interface Zone
public void removeRoom(Room room)
removeRoom
in interface Zone
public void checkAndRemove(Room room)
checkAndRemove
in interface Zone
public void removeUserFromRoom(User user, Room room)
removeUserFromRoom
in interface Zone
public int getMinRoomNameChars()
getMinRoomNameChars
in interface Zone
public void setMinRoomNameChars(int minRoomNameChars)
setMinRoomNameChars
in interface Zone
minRoomNameChars
- the minimum number of characters allowed for Room namepublic int getMaxRoomNameChars()
getMaxRoomNameChars
in interface Zone
public void setMaxRoomNameChars(int maxRoomNameChars)
setMaxRoomNameChars
in interface Zone
maxRoomNameChars
- the maximum number of characters allowed for a Room namepublic void setActive(boolean flag)
public void setId(int id)
Zone
public void setClientAllowedToOverridRoomEvents(boolean flag)
setClientAllowedToOverridRoomEvents
in interface Zone
public void setCustomLogin(boolean flag)
Zone
setCustomLogin
in interface Zone
SFSEvent
,
SFSEventType
public void setForceLogout(boolean flag)
Zone
setForceLogout
in interface Zone
public void setGuestUserAllowed(boolean flag)
setGuestUserAllowed
in interface Zone
Zone.getGuestUserNamePrefix()
public void setFilterUserNames(boolean flag)
setFilterUserNames
in interface Zone
public void setGuestUserNamePrefix(java.lang.String prefix)
Example: by default the prefix is "Guest#"
At the end of the prefix it will be added the unique user id.
setGuestUserNamePrefix
in interface Zone
public void setMaxAllowedRooms(int max)
setMaxAllowedRooms
in interface Zone
max
- the maximum number of Rooms that can be created in the Room.public void setMaxAllowedUsers(int max)
setMaxAllowedUsers
in interface Zone
max
- the max allowed Userspublic void setMaxUserVariablesAllowed(int max)
setMaxUserVariablesAllowed
in interface Zone
max
- the maximum number of User Variables allowed for each User.public void setMaxRoomsCreatedPerUserLimit(int max)
setMaxRoomsCreatedPerUserLimit
in interface Zone
max
- the maximum number of Rooms that a User can create at once.public void setProperty(java.lang.Object key, java.lang.Object value)
setProperty
in interface Zone
key
- the name of the propertyvalue
- the value of the propertypublic void setPublicGroups(java.util.List<java.lang.String> groupIDs)
setPublicGroups
in interface Zone
public void setDefaultGroups(java.util.List<java.lang.String> groupIDs)
setDefaultGroups
in interface Zone
public void setUserCountChangeUpdateInterval(int interval)
setUserCountChangeUpdateInterval
in interface Zone
interval
- the interval in ms between each UserCountUpdate. Recommended range: 500-2000ms.public void setZoneManager(com.smartfoxserver.v2.entities.managers.IZoneManager manager)
setZoneManager
in interface Zone
public void validateUserName(java.lang.String name) throws SFSException
validateUserName
in interface Zone
SFSException
public IFloodFilter getFloodFilter()
getFloodFilter
in interface Zone
public IWordFilter getWordFilter()
getWordFilter
in interface Zone
public void removeAllUsers()
removeAllUsers
in interface Zone
public void removeUser(int userId)
Instead use SFSApi.disconnectUser(User)
removeUser
in interface Zone
public void removeUser(ISession session)
Instead use SFSApi.disconnect(ISession)
removeUser
in interface Zone
public void removeUser(java.lang.String userName)
Instead use SFSApi.disconnectUser(User)
removeUser
in interface Zone
public void removeUser(User user)
Instead use SFSApi.disconnectUser(User)
removeUser
in interface Zone
public int getMaxRoomVariablesAllowed()
NOTE: each Room can set its own limit of Room Variables. However when a Room is created from a client request this Zone limit is applied.
getMaxRoomVariablesAllowed
in interface Zone
public void setMaxRoomVariablesAllowed(int max)
setMaxRoomVariablesAllowed
in interface Zone
max
- the maximum number of Room variables allowed in the Room
NOTE: each Room can set its own limit of Room Variables. However when a Room is created from a client request this Zone limit is applied.
public PrivilegeManager getPrivilegeManager()
getPrivilegeManager
in interface Zone
public void setPrivilegeManager(PrivilegeManager privilegeManager)
setPrivilegeManager
in interface Zone
public BuddyListManager getBuddyListManager()
Instead use SFSBuddyApi
getBuddyListManager
in interface Zone
public void setBuddyListManager(BuddyListManager buddyListManager)
setBuddyListManager
in interface Zone
public IDBManager getDBManager()
getDBManager
in interface Zone
SFSDBManager
public void setDBManager(IDBManager manager)
Zone
setDBManager
in interface Zone
public boolean isFilterPrivateMessages()
isFilterPrivateMessages
in interface Zone
public void setFilterPrivateMessages(boolean flag)
setFilterPrivateMessages
in interface Zone
public User login(LoginData loginData) throws SFSLoginException
Instead use SFSApi.login(ISession, String, String, String, com.smartfoxserver.v2.entities.data.ISFSObject)
login
in interface Zone
SFSLoginException
public ISFSArray getRoomListData()
Zone
getRoomListData
in interface Zone
public ISFSArray getRoomListData(java.util.List<java.lang.String> groupIds)
Zone
getRoomListData
in interface Zone
public java.lang.String toString()
toString
in class java.lang.Object
public com.smartfoxserver.v2.util.IAdminHelper getAdminHelper()
public void setAdminHelper(com.smartfoxserver.v2.util.IAdminHelper adminHelper)
public void initRoomPersistence(RoomStorageMode mode, BaseStorageConfig config)
The Room Persistence API provides two different storage systems for Rooms:
initRoomPersistence
in interface Zone
config
- an optional config object. At the moment it is required only for DB_STORAGE mode only.RoomStorageMode
,
SFSDBManager
,
IRoomStorage
public IRoomStorage getRoomPersistenceApi()
IMPORTANT: it is necessary to first initialize the Persistence system before accessing it. Failing this will return a null object.
getRoomPersistenceApi
in interface Zone
Zone.initRoomPersistence(RoomStorageMode, BaseStorageConfig)
,
IRoomStorage
public boolean isEncrypted()
isEncrypted
in interface Zone
public void setEncrypted(boolean value)
setEncrypted
in interface Zone
value
- toggles protocol cryptography.public int getMaxInvitationsPerRequest()
getMaxInvitationsPerRequest
in interface Zone
public void setMaxInvitationsPerRequest(int maxInvitationsPerRequest)
setMaxInvitationsPerRequest
in interface Zone
maxInvitationsPerRequest
- the max number of people that can be invited in each requestpublic boolean isAllowInvitationsOnlyForBuddies()
isAllowInvitationsOnlyForBuddies
in interface Zone
public void setAllowInvitationsOnlyForBuddies(boolean allowInvitationsOnlyForBuddies)
setAllowInvitationsOnlyForBuddies
in interface Zone
public int getMaxFailedLogins()
Zone
getMaxFailedLogins
in interface Zone
public void setMaxFailedLogins(int value)
Zone
setMaxFailedLogins
in interface Zone
value
- the max number of login attempts (in the same session) a user can fail before being disconnected.public boolean isGeoLocationEnabled()
Zone
isGeoLocationEnabled
in interface Zone
public void setGeoLocationEnabled(boolean value)
Zone
NOTE:IP address geolocation is done via a local database so the added performance cost is negligible.
setGeoLocationEnabled
in interface Zone
value
- true to enable the geolocation service, false to turn it off. Default = falsepublic int getMaxFindUserResults()
Zone
getMaxFindUserResults
in interface Zone
public void setMaxFindUserResults(int value)
Zone
setMaxFindUserResults
in interface Zone
public int getMaxFindRoomResults()
Zone
getMaxFindRoomResults
in interface Zone
public void setMaxFindRoomResults(int value)
Zone
setMaxFindRoomResults
in interface Zone