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 Zonepublic com.smartfoxserver.v2.entities.managers.IUserManager getUserManager()
getUserManager in interface Zonepublic boolean containsGroup(java.lang.String groupId)
containsGroup in interface Zonepublic boolean containsPublicGroup(java.lang.String groupId)
containsPublicGroup in interface Zonepublic Room createRoom(CreateRoomSettings params, User user) throws SFSCreateRoomException
SFSApi.createRoom(Zone, CreateRoomSettings, User) method insteadcreateRoom in interface ZoneSFSCreateRoomExceptionpublic Room createRoom(CreateRoomSettings params) throws SFSCreateRoomException
SFSApi.createRoom(Zone, CreateRoomSettings, User) method insteadcreateRoom in interface ZoneSFSCreateRoomExceptionpublic void changeRoomName(Room room, java.lang.String newName) throws SFSRoomException
changeRoomName in interface ZoneSFSRoomExceptionpublic void changeRoomPasswordState(Room room, java.lang.String password)
changeRoomPasswordState in interface Zonepublic void changeRoomCapacity(Room room, int newMaxUsers, int newMaxSpect)
changeRoomCapacity in interface Zonepublic void addDisabledSystemEvent(java.lang.String eventID)
ZoneaddDisabledSystemEvent in interface Zonepublic void addRoom(Room room) throws SFSTooManyRoomsException
Zone
Instead use SFSApi.createRoom(Zone, CreateRoomSettings, User)
addRoom in interface ZoneSFSTooManyRoomsExceptionpublic 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 Zonepublic int getUserCount()
getUserCount in interface Zonepublic int getTotalRoomCount()
getTotalRoomCount in interface Zonepublic int getGameRoomCount()
getGameRoomCount in interface Zonepublic int getMaxAllowedRooms()
getMaxAllowedRooms in interface Zonepublic int getMaxUserVariablesAllowed()
getMaxUserVariablesAllowed in interface Zonepublic int getMaxAllowedUsers()
getMaxAllowedUsers in interface Zonepublic 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 Zonepublic java.lang.String getName()
public int getId()
public java.lang.Object getProperty(java.lang.Object key)
getProperty in interface Zonekey - the name of the propertypublic void removeProperty(java.lang.Object key)
removeProperty in interface Zonekey - the name of the property.Zone.setProperty(Object, Object)public java.util.List<java.lang.String> getPublicGroups()
getPublicGroups in interface Zonepublic java.util.List<java.lang.String> getGroups()
public java.util.List<java.lang.String> getDefaultGroups()
getDefaultGroups in interface ZoneSFSApi.subscribeRoomGroup(User, String)public Room getRoomById(int id)
getRoomById in interface Zoneid - the Room idpublic Room getRoomByName(java.lang.String name)
getRoomByName in interface Zonename - the Room namepublic java.util.List<Room> getRoomList()
getRoomList in interface Zonepublic java.util.List<Room> getRoomListFromGroup(java.lang.String groupId)
getRoomListFromGroup in interface ZonegroupId - the id of the grouppublic User getUserById(int id)
getUserById in interface Zoneid - the User IDpublic User getUserByName(java.lang.String name)
getUserByName in interface Zonename - the User namepublic User getUserBySession(ISession session)
getUserBySession in interface Zonesession - 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 Zonepublic com.smartfoxserver.v2.util.IResponseThrottler getUCountThrottler()
ZonegetUCountThrottler in interface Zonepublic java.lang.String getDefaultPlayerIdGeneratorClassName()
getDefaultPlayerIdGeneratorClassName in interface Zonepublic void setDefaultPlayerIdGeneratorClassName(java.lang.String className)
setDefaultPlayerIdGeneratorClassName in interface Zonepublic boolean isUploadEnabled()
isUploadEnabled in interface Zonepublic void setUploadEnabled(boolean val)
SFSEventType.FILE_UPLOAD event to be fired
at Zone Level.setUploadEnabled in interface Zonepublic boolean isFilterChainInited()
isFilterChainInited in interface Zonepublic void resetSystemFilterChain()
resetSystemFilterChain in interface Zonepublic boolean isHidden()
Zonepublic void setHidden(boolean flag)
Zonepublic ISystemFilterChain getFilterChain(SystemRequest requestId)
getFilterChain in interface ZonerequestId - the request id associated with the filter chainISystemFilterChain,
ISystemFilterpublic void setFilterChain(SystemRequest requestId, ISystemFilterChain chain)
setFilterChain in interface ZonerequestId - the SystemController request Idchain - the filter chainSysControllerFilterChain,
SysControllerFilterpublic ISFSExtension getExtension()
getExtension in interface Zonepublic void setExtension(ISFSExtension extension)
ZonesetExtension in interface Zonepublic int getUserReconnectionSeconds()
getUserReconnectionSeconds in interface Zonepublic void setUserReconnectionSeconds(int seconds)
setUserReconnectionSeconds in interface Zoneseconds - the amount of seconds to reconnectpublic int getMaxUserIdleTime()
getMaxUserIdleTime in interface Zonepublic void setMaxUserIdleTime(int seconds)
setMaxUserIdleTime in interface Zoneseconds - the intervalpublic java.util.Collection<User> getUsersInGroup(java.lang.String groupId)
getUsersInGroup in interface ZonegroupId - a group Idpublic java.util.Collection<ISession> getSessionsInGroup(java.lang.String groupId)
getSessionsInGroup in interface ZonegroupId - a group Idpublic java.util.Collection<ISession> getSessionsListeningToGroup(java.lang.String groupId)
ZonegetSessionsListeningToGroup in interface ZonegroupId - a group Idpublic java.util.Collection<ISession> getSessionList()
getSessionList in interface Zonepublic java.util.Collection<User> getUserList()
getUserList in interface Zonepublic com.smartfoxserver.v2.entities.managers.IZoneManager getZoneManager()
getZoneManager in interface Zonepublic boolean isActive()
public boolean isClientAllowedToOverridRoomEvents()
isClientAllowedToOverridRoomEvents in interface Zonepublic boolean isCustomLogin()
isCustomLogin in interface ZoneSFSEvent,
SFSEventTypepublic boolean isForceLogout()
isForceLogout in interface Zonepublic boolean isGuestUserAllowed()
isGuestUserAllowed in interface ZoneZone.getGuestUserNamePrefix()public boolean isSystemEventAllowed(java.lang.String eventID)
isSystemEventAllowed in interface Zonepublic boolean isFilterUserNames()
isFilterUserNames in interface Zonepublic boolean isFilterRoomNames()
isFilterRoomNames in interface Zonepublic void setFilterRoomNames(boolean flag)
setFilterRoomNames in interface Zoneflag - a booleanpublic boolean isFilterBuddyMessages()
isFilterBuddyMessages in interface Zonepublic void setFilterBuddyMessages(boolean flag)
setFilterBuddyMessages in interface Zonepublic boolean containsProperty(java.lang.Object key)
containsProperty in interface Zonekey - the name of the propertypublic void registerEventsForRoomGroup(java.lang.String groupId,
java.util.Set<SFSRoomEvents> flags)
registerEventsForRoomGroup in interface Zonepublic boolean isGroupEventSet(java.lang.String groupId,
SFSRoomEvents eventToCheck)
isGroupEventSet in interface ZonegroupId - the group nameeventToCheck - the type of event to checkpublic java.util.Set<SFSRoomEvents> getGroupEvents(java.lang.String groupId)
getGroupEvents in interface Zonepublic void removeDisabledSystemEvent(java.lang.String eventID)
ZoneremoveDisabledSystemEvent in interface Zonepublic void removeRoom(int roomId)
removeRoom in interface Zonepublic void removeRoom(java.lang.String name)
removeRoom in interface Zonepublic void removeRoom(Room room)
removeRoom in interface Zonepublic void checkAndRemove(Room room)
checkAndRemove in interface Zonepublic void removeUserFromRoom(User user, Room room)
removeUserFromRoom in interface Zonepublic int getMinRoomNameChars()
getMinRoomNameChars in interface Zonepublic void setMinRoomNameChars(int minRoomNameChars)
setMinRoomNameChars in interface ZoneminRoomNameChars - the minimum number of characters allowed for Room namepublic int getMaxRoomNameChars()
getMaxRoomNameChars in interface Zonepublic void setMaxRoomNameChars(int maxRoomNameChars)
setMaxRoomNameChars in interface ZonemaxRoomNameChars - the maximum number of characters allowed for a Room namepublic void setActive(boolean flag)
public void setId(int id)
Zonepublic void setClientAllowedToOverridRoomEvents(boolean flag)
setClientAllowedToOverridRoomEvents in interface Zonepublic void setCustomLogin(boolean flag)
ZonesetCustomLogin in interface ZoneSFSEvent,
SFSEventTypepublic void setForceLogout(boolean flag)
ZonesetForceLogout in interface Zonepublic void setGuestUserAllowed(boolean flag)
setGuestUserAllowed in interface ZoneZone.getGuestUserNamePrefix()public void setFilterUserNames(boolean flag)
setFilterUserNames in interface Zonepublic 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 Zonepublic void setMaxAllowedRooms(int max)
setMaxAllowedRooms in interface Zonemax - the maximum number of Rooms that can be created in the Room.public void setMaxAllowedUsers(int max)
setMaxAllowedUsers in interface Zonemax - the max allowed Userspublic void setMaxUserVariablesAllowed(int max)
setMaxUserVariablesAllowed in interface Zonemax - the maximum number of User Variables allowed for each User.public void setMaxRoomsCreatedPerUserLimit(int max)
setMaxRoomsCreatedPerUserLimit in interface Zonemax - 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 Zonekey - the name of the propertyvalue - the value of the propertypublic void setPublicGroups(java.util.List<java.lang.String> groupIDs)
setPublicGroups in interface Zonepublic void setDefaultGroups(java.util.List<java.lang.String> groupIDs)
setDefaultGroups in interface Zonepublic void setUserCountChangeUpdateInterval(int interval)
setUserCountChangeUpdateInterval in interface Zoneinterval - the interval in ms between each UserCountUpdate. Recommended range: 500-2000ms.public void setZoneManager(com.smartfoxserver.v2.entities.managers.IZoneManager manager)
setZoneManager in interface Zonepublic void validateUserName(java.lang.String name)
throws SFSException
validateUserName in interface ZoneSFSExceptionpublic IFloodFilter getFloodFilter()
getFloodFilter in interface Zonepublic IWordFilter getWordFilter()
getWordFilter in interface Zonepublic void removeAllUsers()
removeAllUsers in interface Zonepublic void removeUser(int userId)
Instead use SFSApi.disconnectUser(User)
removeUser in interface Zonepublic void removeUser(ISession session)
Instead use SFSApi.disconnect(ISession)
removeUser in interface Zonepublic void removeUser(java.lang.String userName)
Instead use SFSApi.disconnectUser(User)
removeUser in interface Zonepublic void removeUser(User user)
Instead use SFSApi.disconnectUser(User)
removeUser in interface Zonepublic 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 Zonepublic void setMaxRoomVariablesAllowed(int max)
setMaxRoomVariablesAllowed in interface Zonemax - 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 Zonepublic void setPrivilegeManager(PrivilegeManager privilegeManager)
setPrivilegeManager in interface Zonepublic BuddyListManager getBuddyListManager()
Instead use SFSBuddyApi
getBuddyListManager in interface Zonepublic void setBuddyListManager(BuddyListManager buddyListManager)
setBuddyListManager in interface Zonepublic IDBManager getDBManager()
getDBManager in interface ZoneSFSDBManagerpublic void setDBManager(IDBManager manager)
ZonesetDBManager in interface Zonepublic boolean isFilterPrivateMessages()
isFilterPrivateMessages in interface Zonepublic void setFilterPrivateMessages(boolean flag)
setFilterPrivateMessages in interface Zonepublic User login(LoginData loginData) throws SFSLoginException
Instead use SFSApi.login(ISession, String, String, String, com.smartfoxserver.v2.entities.data.ISFSObject)
login in interface ZoneSFSLoginExceptionpublic ISFSArray getRoomListData()
ZonegetRoomListData in interface Zonepublic ISFSArray getRoomListData(java.util.List<java.lang.String> groupIds)
ZonegetRoomListData in interface Zonepublic java.lang.String toString()
toString in class java.lang.Objectpublic 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 Zoneconfig - an optional config object. At the moment it is required only for DB_STORAGE mode only.RoomStorageMode,
SFSDBManager,
IRoomStoragepublic 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 ZoneZone.initRoomPersistence(RoomStorageMode, BaseStorageConfig),
IRoomStoragepublic boolean isEncrypted()
isEncrypted in interface Zonepublic void setEncrypted(boolean value)
setEncrypted in interface Zonevalue - toggles protocol cryptography.public int getMaxInvitationsPerRequest()
getMaxInvitationsPerRequest in interface Zonepublic void setMaxInvitationsPerRequest(int maxInvitationsPerRequest)
setMaxInvitationsPerRequest in interface ZonemaxInvitationsPerRequest - the max number of people that can be invited in each requestpublic boolean isAllowInvitationsOnlyForBuddies()
isAllowInvitationsOnlyForBuddies in interface Zonepublic void setAllowInvitationsOnlyForBuddies(boolean allowInvitationsOnlyForBuddies)
setAllowInvitationsOnlyForBuddies in interface Zonepublic int getMaxFailedLogins()
ZonegetMaxFailedLogins in interface Zonepublic void setMaxFailedLogins(int value)
ZonesetMaxFailedLogins in interface Zonevalue - the max number of login attempts (in the same session) a user can fail before being disconnected.public boolean isGeoLocationEnabled()
ZoneisGeoLocationEnabled in interface Zonepublic void setGeoLocationEnabled(boolean value)
ZoneNOTE:IP address geolocation is done via a local database so the added performance cost is negligible.
setGeoLocationEnabled in interface Zonevalue - true to enable the geolocation service, false to turn it off. Default = falsepublic int getMaxFindUserResults()
ZonegetMaxFindUserResults in interface Zonepublic void setMaxFindUserResults(int value)
ZonesetMaxFindUserResults in interface Zonepublic int getMaxFindRoomResults()
ZonegetMaxFindRoomResults in interface Zonepublic void setMaxFindRoomResults(int value)
ZonesetMaxFindRoomResults in interface Zone