Interface Zone
- All Known Implementing Classes:
SFSZone
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoidchangeRoomCapacity(Room room, int newMaxUsers, int maxMaxSpect) voidchangeRoomName(Room room, String newName) voidchangeRoomPasswordState(Room room, String password) voidcheckAndRemove(Room room) booleancontainsGroup(String groupId) Check if the Zone contains the specified GroupbooleancontainsProperty(Object key) Checks the existence of a Zone propertybooleancontainsPublicGroup(String groupId) Check if the Zone contains the specified public GroupcreateRoom(CreateRoomSettings params) createRoom(CreateRoomSettings params, User user) Obtain a reference to the Zone's Database Manager.Get the list of Groups that each User will be automatically subscribed to when joining the Zone.getDump()getFilterChain(SystemRequest requestId) Obtain a reference to the Zone's SystemFilterChain.intgetGroupEvents(String groupId) Get the full list of Room Groups available in the Zone.Get the prefix used by the system to auto-generate guest user names.intgetId()intThe maximum number of Rooms that can be created in the Room.intThe maximum number of users allowed to join the Zone.intThe max number of login attempts (in the same session) a user can fail before being disconnected.intGet the max number of "FindRoom" results for a client request.intGet the max number of "Find User" results for a client request.intGet the max number of people that can be invited a by a single client side JoinRoomInvitationRequestintThe maximum number of characters allowed for a Room nameintThe maximum number of Rooms that a User can create at once.intThe maximum number of Room Variables allowed for each Room.intGet the max allowed idle seconds for the UDP connection.intGet the max allowed idle time for a User.intThe maximum number of characters allowed for a User namesintThe maximum number of User Variables allowed for each User.intThe minimum number of characters allowed for Room namegetName()The name of the Zone.getProperty(Object key) Properties are custom values that can be added or removed from the Zone at run-time.Get a list of names of the "Public" Room Groups available in the Zone.com.smartfoxserver.bitswarm.rdp.TransportConfiggetRoomById(int id) Get a Room from its unique IDgetRoomByName(String name) Get a Room from its nameGet the list of Rooms in the ZonegetRoomListData(List<String> groupIds) getRoomListFromGroup(String groupId) Get the list of Rooms from a specific GroupgetRoomListFromGroupList(Collection<String> groups) Obtain a Room list generated by merging all Rooms from the provided group namescom.smartfoxserver.entities.managers.IRoomManagerObtain the Room Persistence API object.Get the list of Sessions logged in the ZonegetSessionsInGroup(String groupId) Get a list of Sessions from all Rooms in the provided Room GroupgetSessionsListeningToGroup(String groupId) Get a list of Sessions listening for events in a specific Groupintcom.smartfoxserver.util.IResponseThrottlergetUserById(int id) Get a User from its unique IDgetUserByName(String name) Get a User from its namegetUserBySession(ISession session) Get a User from its Session objectintGet the current amount of Users connected to the ZoneintGet the rate (in ms.) at which the UserCountUpdates events are fired to the clients.Get the list of Users logged in the Zonecom.smartfoxserver.entities.managers.IUserManagerintReturn the amount of seconds available for a User to reconnect to the system in case their socket connection goes down.getUsersInGroup(String groupId) Get a list of Users from all Rooms in the provided Room Groupcom.smartfoxserver.util.IWordFiltercom.smartfoxserver.entities.managers.IZoneManagervoidinitRoomPersistence(RoomStorageMode mode, BaseStorageConfig config) Initializes the Room Persistence functionality.booleanisActive()Checks if the Zone is currently enabled in the system or not.booleanTrue if only buddies can be invited by a client side JoinRoomInvitationRequest, false otherwise.booleanbooleanCheck if the Zone fires LOGIN events to the Zone extension at login time.booleanTrue if protocol cryptography is turned on in this Zone.booleanToggle the filtering of Buddy messages via the Words Filter.booleanReturns true if the FilterChain was initializedbooleanIf turned on the Zone will apply the Words Filter to private messagesbooleanIf turned on the Zone will apply the Words Filter to Room namesbooleanIf turned on the Zone will apply the Words Filter to User names provided at login timebooleanIf turned on it allows a User to connect from another location while another connection is already active.booleanToggles geolocation for clients.booleanisGroupEventSet(String groupId, SFSRoomEvents eventToCheck) Checks whether a specific Room Event for the specified Group is activebooleanCheck if the Zone allows guest users (those sending no name and no password).booleanisHidden()booleanReturns true if the LagMonitor requests are also actively resetting the User's idle timerbooleanbooleanTrue if the Zone supports HTTP uploads.voidregisterEventsForRoomGroup(String groupId, Set<SFSRoomEvents> flags) voidvoidremoveProperty(Object key) Removes a property.voidremoveRoom(int roomId) voidremoveRoom(Room room) voidremoveRoom(String name) voidremoveUser(int userId) voidremoveUser(ISession session) voidremoveUser(User user) voidremoveUser(String userName) voidremoveUserFromRoom(User user, Room room) voidResets the whole SystemController Filter chain.voidsetActive(boolean flag) Changes the state of the Zone.voidsetAllowInvitationsOnlyForBuddies(boolean allowInvitationsOnlyForBuddies) voidsetBuddyListManager(BuddyListManager buddyListManager) voidsetClientAllowedToOverridRoomEvents(boolean flag) voidsetCustomLogin(boolean flag) voidsetDBManager(IDBManager manager) voidsetDefaultGroups(List<String> groupIDs) voidsetDefaultPlayerIdGeneratorClassName(String className) voidsetEncrypted(boolean value) voidsetExtension(ISFSExtension extension) voidsetFilterBuddyMessages(boolean flag) voidsetFilterChain(SystemRequest requestId, ISystemFilterChain chain) Set a SystemFilterChain for a specific SystemController's Request.voidsetFilterPrivateMessages(boolean flag) voidsetFilterRoomNames(boolean flag) voidsetFilterUserNames(boolean flag) voidsetForceLogout(boolean flag) voidsetGeoLocationEnabled(boolean value) voidsetGuestUserAllowed(boolean flag) voidsetGuestUserNamePrefix(String prefix) voidsetHidden(boolean flag) voidsetId(int id) voidsetLagMonitorKeepAlive(boolean value) voidsetMaxAllowedRooms(int max) voidsetMaxAllowedUsers(int max) voidsetMaxFailedLogins(int value) voidsetMaxFindRoomResults(int value) voidsetMaxFindUserResults(int value) voidsetMaxInvitationsPerRequest(int maxInvitationsPerRequest) voidsetMaxRoomNameChars(int max) voidsetMaxRoomsCreatedPerUserLimit(int max) voidsetMaxRoomVariablesAllowed(int max) voidsetMaxUdpIdleSeconds(int seconds) voidsetMaxUserIdleTime(int seconds) voidsetMaxUserNameChars(int max) voidsetMaxUserVariablesAllowed(int max) voidsetMinRoomNameChars(int min) voidsetPrivilegeManager(PrivilegeManager privilegeManager) voidsetProperty(Object key, Object value) Properties are custom values that can be added or removed from the Zone at run-time.voidsetPublicGroups(List<String> groupIDs) voidsetRdpTxConfig(com.smartfoxserver.bitswarm.rdp.TransportConfig cfg) voidsetUdpKeepAlive(boolean value) When true, sends a ping every few seconds to every UDP connection to keep it alive.voidsetUploadEnabled(boolean val) voidsetUserCountChangeUpdateInterval(int interval) voidsetUserReconnectionSeconds(int seconds) voidsetZoneManager(com.smartfoxserver.entities.managers.IZoneManager manager) voidvalidateUserName(String name)
-
Method Details
-
getUserManager
com.smartfoxserver.entities.managers.IUserManager getUserManager()- Internal
-
isActive
boolean isActive()Checks if the Zone is currently enabled in the system or not. Inactive Zones won't allow anyone to login. You can deactivate a Zone at runtime (from the AdminTool) if you are planning to remove it. All Users will be disconnected.- Returns:
- true, if the Zone is active
-
setActive
void setActive(boolean flag) Changes the state of the Zone. De-activating a Zone at runtime will result in an abrupt disconnection of all Users. Use only when strictly necessary.- Parameters:
flag- the state of the Zone
-
isHidden
boolean isHidden()- Internal
-
setHidden
void setHidden(boolean flag) - Internal
-
setId
void setId(int id) - Internal
-
getName
String getName()The name of the Zone. Each Zone must have a unique name.- Returns:
- the name of the Zone.
-
getId
int getId()- Internal
-
getMaxAllowedUsers
int getMaxAllowedUsers()The maximum number of users allowed to join the Zone.- Returns:
- the maximum number of users allowed to join the Zone.
-
setMaxAllowedUsers
void setMaxAllowedUsers(int max) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getMaxAllowedRooms
int getMaxAllowedRooms()The maximum number of Rooms that can be created in the Room.- Returns:
- the maximum number of Rooms that can be created in the Room.
-
setMaxAllowedRooms
void setMaxAllowedRooms(int max) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getMaxRoomsCreatedPerUserLimit
int getMaxRoomsCreatedPerUserLimit()The maximum number of Rooms that a User can create at once.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.
- Returns:
- the maximum number of Rooms that a User can create at once.
-
setMaxRoomsCreatedPerUserLimit
void setMaxRoomsCreatedPerUserLimit(int max) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getMaxUserVariablesAllowed
int getMaxUserVariablesAllowed()The maximum number of User Variables allowed for each User.- Returns:
- the maximum number of User Variables allowed for each User.
-
setMaxUserVariablesAllowed
void setMaxUserVariablesAllowed(int max) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getMaxRoomVariablesAllowed
int getMaxRoomVariablesAllowed()The maximum number of Room Variables allowed for each 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.
- Returns:
- the maximum number of Room Variables allowed for each Room.
-
setMaxRoomVariablesAllowed
void setMaxRoomVariablesAllowed(int max) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getMinRoomNameChars
int getMinRoomNameChars()The minimum number of characters allowed for Room name- Returns:
- the minimum number of characters allowed for Room name
-
setMinRoomNameChars
void setMinRoomNameChars(int min) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getMaxRoomNameChars
int getMaxRoomNameChars()The maximum number of characters allowed for a Room name- Returns:
- the maximum number of characters allowed for a Room name
-
setMaxRoomNameChars
void setMaxRoomNameChars(int max) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getMaxUserNameChars
int getMaxUserNameChars()The maximum number of characters allowed for a User names- Returns:
- the maximum number of characters allowed for a User names
-
setMaxUserNameChars
void setMaxUserNameChars(int max) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getUserCountChangeUpdateInterval
int getUserCountChangeUpdateInterval()Get the rate (in ms.) at which the UserCountUpdates events are fired to the clients.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
- Returns:
- the interval in milliseconds between each UserCountUpdate
-
setUserCountChangeUpdateInterval
void setUserCountChangeUpdateInterval(int interval) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getMaxUserIdleTime
int getMaxUserIdleTime()Get the max allowed idle time for a User. When this interval expires the server will disconnect the "idle" User. Any request sent from the client will reset the Idle timer.- Returns:
- the time in seconds
-
setMaxUserIdleTime
void setMaxUserIdleTime(int seconds) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getMaxUdpIdleSeconds
int getMaxUdpIdleSeconds()Get the max allowed idle seconds for the UDP connection. Any request sent from the client will reset the idle timer.- Returns:
- the time in seconds
-
isUdpKeepAlive
boolean isUdpKeepAlive()- Returns:
- true if the keep alive system is active for the UDP connection
-
setUdpKeepAlive
void setUdpKeepAlive(boolean value) When true, sends a ping every few seconds to every UDP connection to keep it alive. This is only useful if the UDP communication is expected to have "gaps" for a some time (e.g. more than ten seconds). In most action games UDP updates happen at a constant rate and there is no need to use an extra keep-alive signal.Default value is false
- Parameters:
value-
-
setMaxUdpIdleSeconds
void setMaxUdpIdleSeconds(int seconds) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
isCustomLogin
boolean isCustomLogin()Check if the Zone fires LOGIN events to the Zone extension at login time. This allows the developer to take full control over the login process in their extension code, like checking the credentials etc...- Returns:
- true if the Zone uses a custom login process
- See Also:
-
isForceLogout
boolean isForceLogout()If turned on it allows a User to connect from another location while another connection is already active. This will result in the first session to be disconnected and the new one to be started.- Returns:
- true if the feature is turned on
-
setForceLogout
void setForceLogout(boolean flag) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
setCustomLogin
void setCustomLogin(boolean flag) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
isGuestUserAllowed
boolean isGuestUserAllowed()Check if the Zone allows guest users (those sending no name and no password). If so the server will automatically set up a "guest name" for the User.- Returns:
- true if the Zone allows guests
- See Also:
-
setGuestUserAllowed
void setGuestUserAllowed(boolean flag) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
isFilterUserNames
boolean isFilterUserNames()If turned on the Zone will apply the Words Filter to User names provided at login time- Returns:
- true if filtering is turned on
-
setFilterUserNames
void setFilterUserNames(boolean flag) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
isFilterRoomNames
boolean isFilterRoomNames()If turned on the Zone will apply the Words Filter to Room names- Returns:
- true if filtering is turned on
-
setFilterRoomNames
void setFilterRoomNames(boolean flag) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
isFilterPrivateMessages
boolean isFilterPrivateMessages()If turned on the Zone will apply the Words Filter to private messages- Returns:
- true if the Words Filter is applied to private messages
-
setFilterPrivateMessages
void setFilterPrivateMessages(boolean flag) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
isFilterBuddyMessages
boolean isFilterBuddyMessages()Toggle the filtering of Buddy messages via the Words Filter.- Returns:
- true if buddy messages filtering is turned on
-
setFilterBuddyMessages
void setFilterBuddyMessages(boolean flag) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getUserReconnectionSeconds
int getUserReconnectionSeconds()Return the amount of seconds available for a User to reconnect to the system in case their socket connection goes down. A value of zero will turn the reconnection feature off.- Returns:
- the amount of seconds to reconnect.
-
setUserReconnectionSeconds
void setUserReconnectionSeconds(int seconds) - Internal
-
getGuestUserNamePrefix
String getGuestUserNamePrefix()Get the prefix used by the system to auto-generate guest user names.Example: by default the prefix is "Guest#"
At the end of the prefix it will be added the unique user id.- Returns:
- the user name prefix
-
setGuestUserNamePrefix
- Internal
-
getDefaultPlayerIdGeneratorClassName
String getDefaultPlayerIdGeneratorClassName()- Internal
-
setDefaultPlayerIdGeneratorClassName
- Internal
-
isUploadEnabled
boolean isUploadEnabled()True if the Zone supports HTTP uploads.- Returns:
- true if the Zone supports HTTP uploads.
-
setUploadEnabled
void setUploadEnabled(boolean val) - Internal
-
isGeoLocationEnabled
boolean isGeoLocationEnabled()Toggles geolocation for clients.- Returns:
- true if geolocation is enabled in this Zone
- Since:
- 2.12
-
setGeoLocationEnabled
void setGeoLocationEnabled(boolean value) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getPublicGroups
Get a list of names of the "Public" Room Groups available in the Zone. Public Groups are those in which the client is allowed to create Rooms dynamically. The other Groups can be manipulated only via server side code.- Returns:
- the list of group ids
-
setPublicGroups
- Internal
- Use the AdminTool's Zone Configurator to change this value
-
getGroups
Get the full list of Room Groups available in the Zone. More groups can be added from server side by simply assigning a non-existent Group Id to a newly created Room. As soon as the new Group is detected, it will be added to the Group List- Returns:
- the list of Room Groups
-
getDefaultGroups
Get the list of Groups that each User will be automatically subscribed to when joining the Zone.- Returns:
- the list of default groups
- See Also:
-
setDefaultGroups
- Internal
- Use the AdminTool's Zone Configurator to change this value
-
getPrivilegeManager
PrivilegeManager getPrivilegeManager()- Internal
-
setPrivilegeManager
- Internal
-
getUserCount
int getUserCount()Get the current amount of Users connected to the Zone- Returns:
- the amount of Users connected to the Zone
-
getTotalRoomCount
int getTotalRoomCount()- Returns:
- the total number of Rooms
-
getGameRoomCount
int getGameRoomCount()- Returns:
- the total number of game Rooms
-
createRoom
- Throws:
SFSCreateRoomException- Internal
- Use this instead:
SFSApi.createRoom(Zone, CreateRoomSettings, User)
-
createRoom
- Throws:
SFSCreateRoomException- Internal
- Use this instead:
SFSApi.createRoom(Zone, CreateRoomSettings, User)
-
isClientAllowedToOverridRoomEvents
boolean isClientAllowedToOverridRoomEvents()- Internal
-
setClientAllowedToOverridRoomEvents
void setClientAllowedToOverridRoomEvents(boolean flag) - Internal
-
registerEventsForRoomGroup
- Internal
-
isGroupEventSet
Checks whether a specific Room Event for the specified Group is active- Parameters:
groupId- the group nameeventToCheck- the type of event to check- Returns:
- true if the event is active
-
getGroupEvents
- Internal
-
getRoomManager
com.smartfoxserver.entities.managers.IRoomManager getRoomManager()- Internal
-
containsGroup
Check if the Zone contains the specified Group- Returns:
- true if the Zone contains the specified Group
-
containsPublicGroup
Check if the Zone contains the specified public Group- Returns:
- true if the Zone contains the specified public Group
-
getProperty
Properties are custom values that can be added or removed from the Zone at run-time. They can be used for many purposes, in particular to keep global references that can be shared across multiple objects in the extension code, Rooms etc...- Parameters:
key- the name of the property- Returns:
- the value of the property, null if the property doesn't exist
-
setProperty
Properties are custom values that can be added or removed from the Zone at run-time. They can be used for many purposes, in particular to keep global references that can be shared across multiple objects in the extension code, Rooms etc...- Parameters:
key- the name of the propertyvalue- the value of the property
-
containsProperty
Checks the existence of a Zone property- Parameters:
key- the name of the property- Returns:
- true if the property exists
-
removeProperty
Removes a property.- Parameters:
key- the name of the property.- See Also:
-
getZoneManager
com.smartfoxserver.entities.managers.IZoneManager getZoneManager()- Internal
-
setZoneManager
void setZoneManager(com.smartfoxserver.entities.managers.IZoneManager manager) - Internal
-
getRoomList
Get the list of Rooms in the Zone- Returns:
- the room list
-
getRoomListFromGroup
Get the list of Rooms from a specific Group- Parameters:
groupId- the id of the group- Returns:
- the list of Rooms in the specified Group
-
getRoomListFromGroupList
Obtain a Room list generated by merging all Rooms from the provided group names- Parameters:
groups- a list of valid Room Group names- Returns:
- the Room list generated by merging all Rooms from the provided group names
-
getRoomById
Get a Room from its unique ID- Parameters:
id- the Room id- Returns:
- the Room or null if no Room exists with the specified ID
-
getRoomByName
Get a Room from its name- Parameters:
name- the Room name- Returns:
- the Room or null if no Room exists with the specified name
-
addRoom
- Throws:
SFSTooManyRoomsException- Internal
Instead use
SFSApi.createRoom(Zone, CreateRoomSettings, User)
-
removeRoom
- Internal
Instead use
SFSApi.removeRoom(Room)
-
removeRoom
void removeRoom(int roomId) - Internal
Instead use
SFSApi.removeRoom(Room)
-
removeRoom
- Internal
Instead use
SFSApi.removeRoom(Room)
-
checkAndRemove
-
changeRoomName
- Throws:
SFSRoomException- Internal
Instead use
SFSApi.changeRoomName(User, Room, String)
-
changeRoomPasswordState
- Internal
Instead use
SFSApi.changeRoomPassword(User, Room, String)
-
changeRoomCapacity
- Internal
Instead use
SFSApi.changeRoomCapacity(User, Room, int, int)
-
validateUserName
- Throws:
SFSException- Internal
-
getUserById
Get a User from its unique ID- Parameters:
id- the User ID- Returns:
- the User, or null if no User exists with the provided ID
-
getUserByName
Get a User from its name- Parameters:
name- the User name- Returns:
- the User, or null if no User exists with the provided name
-
getUserBySession
Get a User from its Session object- Parameters:
session- the Session- Returns:
- the User, or null if no User exists for the provided Session. In this case it would mean that the client is connected but not logged id.
-
getUsersInGroup
Get a list of Users from all Rooms in the provided Room Group- Parameters:
groupId- a group Id- Returns:
- the list of Users from all Rooms in the provided Room Group
-
getSessionsInGroup
Get a list of Sessions from all Rooms in the provided Room Group- Parameters:
groupId- a group Id- Returns:
- the list of Sessions from all Rooms in the provided Room Group
-
getSessionsListeningToGroup
Get a list of Sessions listening for events in a specific Group- Parameters:
groupId- a group Id- Returns:
- the list of Sessions listening for events in a specific Group
-
getSessionList
Collection<ISession> getSessionList()Get the list of Sessions logged in the Zone- Returns:
- the list of Sessions logged in the Zone
-
getUserList
Collection<User> getUserList()Get the list of Users logged in the Zone- Returns:
- the list of Users logged in the Zone
-
removeAllUsers
void removeAllUsers()- Internal
-
getFilterChain
Obtain a reference to the Zone's SystemFilterChain. Here you can add custom filters that will execute before any System Request is handled by the system itself.- Parameters:
requestId- the request id associated with the filter chain- Returns:
- the SystemFilterChain
- See Also:
-
setFilterChain
Set a SystemFilterChain for a specific SystemController's Request. For example you can set one ore more filters for the CreateRoom request or the PublicMessage etc... The filter chain will be executed before the request is passed to the SystemController.- Parameters:
requestId- the SystemController request Idchain- the filter chain- See Also:
-
isFilterChainInited
boolean isFilterChainInited()Returns true if the FilterChain was initialized- Returns:
- true if at least one Filter was added to the FilterChain
-
resetSystemFilterChain
void resetSystemFilterChain()Resets the whole SystemController Filter chain. All filters for any SystemRequest is removed. -
removeUser
void removeUser(int userId) - Internal
Instead use
SFSApi.disconnectUser(User)
-
removeUser
- Internal
Instead use
SFSApi.disconnectUser(User)
-
removeUser
- Internal
Instead use
SFSApi.disconnect(ISession)
-
removeUser
- Internal
Instead use
SFSApi.disconnectUser(User)
-
removeUserFromRoom
- Internal
Instead use
SFSApi.leaveRoom(User, Room)
-
getUCountThrottler
com.smartfoxserver.util.IResponseThrottler getUCountThrottler()- Internal
-
getWordFilter
com.smartfoxserver.util.IWordFilter getWordFilter()- Internal
-
getFloodFilter
IFloodFilter getFloodFilter()- Internal
-
getExtension
ISFSExtension getExtension()- Internal
-
setExtension
- Internal
-
getDBManager
IDBManager getDBManager()Obtain a reference to the Zone's Database Manager.- See Also:
-
setDBManager
- Internal
-
initRoomPersistence
Initializes the Room Persistence functionality. Typically you will invoke this method in the init() method of your Extension.The Room Persistence API provides two different storage systems for Rooms:
- FILE_STORAGE: which uses the local file system to store Room data. Doesn't require a config object.
- DB_STORAGE which uses an external database (via the Zone's DBManager) to store Room data. Requires a config object.
- Parameters:
config- an optional config object. At the moment it is required only for DB_STORAGE mode only.- See Also:
-
getRoomPersistenceApi
IRoomStorage getRoomPersistenceApi()Obtain the Room Persistence API object.IMPORTANT: it is necessary to first initialize the Persistence system before accessing it. Failing this will return a null object.
- Returns:
- the Room Persistence API object or null if the API was not initialized.
- See Also:
-
login
- Throws:
SFSLoginException- Internal
Instead use
SFSApi.login(ISession, String, String, String, com.smartfoxserver.entities.data.ISFSObject)
-
getRoomListData
ISFSArray getRoomListData()- Internal
-
getRoomListData
- Internal
-
getBuddyListManager
BuddyListManager getBuddyListManager()- Internal
Instead use
SFSBuddyApi
-
setBuddyListManager
- Internal
-
isEncrypted
boolean isEncrypted()True if protocol cryptography is turned on in this Zone. Requests sent unencrypted when the flag is turned ON will result in a sudden client disconnection.- Returns:
- true if protocol cryptography is turned on in this Zone
-
setEncrypted
void setEncrypted(boolean value) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getMaxInvitationsPerRequest
int getMaxInvitationsPerRequest()Get the max number of people that can be invited a by a single client side JoinRoomInvitationRequest- Returns:
- the max number of people that can be invited a by a single client side JoinRoomInvitationRequest
-
setMaxInvitationsPerRequest
void setMaxInvitationsPerRequest(int maxInvitationsPerRequest) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
isAllowInvitationsOnlyForBuddies
boolean isAllowInvitationsOnlyForBuddies()True if only buddies can be invited by a client side JoinRoomInvitationRequest, false otherwise.- Returns:
- true if only buddies can be invited by a client side JoinRoomInvitationRequest, false otherwise.
-
setAllowInvitationsOnlyForBuddies
void setAllowInvitationsOnlyForBuddies(boolean allowInvitationsOnlyForBuddies) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getMaxFailedLogins
int getMaxFailedLogins()The max number of login attempts (in the same session) a user can fail before being disconnected.- Returns:
- the max number of login attempts (in the same session) a user can fail before being disconnected.
-
setMaxFailedLogins
void setMaxFailedLogins(int value) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getMaxFindUserResults
int getMaxFindUserResults()Get the max number of "Find User" results for a client request. Default is 50.- Returns:
- the max number of results for "Find User" requests from client side.
-
setMaxFindUserResults
void setMaxFindUserResults(int value) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getMaxFindRoomResults
int getMaxFindRoomResults()Get the max number of "FindRoom" results for a client request. Default is 50.- Returns:
- the max number of results for "FindRoom" requests from client side.
-
setMaxFindRoomResults
void setMaxFindRoomResults(int value) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
isLagMonitorKeepAlive
boolean isLagMonitorKeepAlive()Returns true if the LagMonitor requests are also actively resetting the User's idle timer -
setLagMonitorKeepAlive
void setLagMonitorKeepAlive(boolean value) - Internal
- Use the AdminTool's Zone Configurator to change this value
-
getRdpTxConfig
com.smartfoxserver.bitswarm.rdp.TransportConfig getRdpTxConfig()- Internal
-
setRdpTxConfig
void setRdpTxConfig(com.smartfoxserver.bitswarm.rdp.TransportConfig cfg) - Internal
-
getDump
String getDump()- Internal
-