Interface Zone
- 
- All Known Implementing Classes:
- SFSZone
 
 public interface Zone
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddDisabledSystemEvent(java.lang.String eventID)INTERNALvoidaddRoom(Room room)INTERNALvoidchangeRoomCapacity(Room room, int newMaxUsers, int maxMaxSpect)INTERNALvoidchangeRoomName(Room room, java.lang.String newName)INTERNALvoidchangeRoomPasswordState(Room room, java.lang.String password)INTERNALvoidcheckAndRemove(Room room)booleancontainsGroup(java.lang.String groupId)Check if the Zone contains the specified GroupbooleancontainsProperty(java.lang.Object key)Checks the existance of a Zone propertybooleancontainsPublicGroup(java.lang.String groupId)Check if the Zone contains the specified public GroupRoomcreateRoom(CreateRoomSettings params)RoomcreateRoom(CreateRoomSettings params, User user)BuddyListManagergetBuddyListManager()INTERNALIDBManagergetDBManager()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.StringgetDefaultPlayerIdGeneratorClassName()java.lang.StringgetDump()ISFSExtensiongetExtension()INTERNALISystemFilterChaingetFilterChain(SystemRequest requestId)Obtain a reference to the Zone's SystemFilterChain.IFloodFiltergetFloodFilter()INTERNALintgetGameRoomCount()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.StringgetGuestUserNamePrefix()Get the prefix used by the system to auto-generate guest user names.intgetId()A numeric ID used by the AdminTool.intgetMaxAllowedRooms()The maximum number of Rooms that can be created in the Room.intgetMaxAllowedUsers()The maximum number of users allowed to join the Zone.intgetMaxFailedLogins()The max number of login attempts (in the same session) a user can fail before being disconnected.intgetMaxFindRoomResults()Get the max number of "FindRoom" results for a client request.intgetMaxFindUserResults()Get the max number of "Find User" results for a client request.intgetMaxInvitationsPerRequest()Get the max number of people that can be invited a by a single client side JoinRoomInvitationRequestintgetMaxRoomNameChars()The maximum number of characters allowed for a Room nameintgetMaxRoomsCreatedPerUserLimit()The maximum number of Rooms that a User can create at once.intgetMaxRoomVariablesAllowed()The maximum number of Room Variables allowed for each Room.intgetMaxUserIdleTime()Get the max allowed idle time for a User.intgetMaxUserVariablesAllowed()The maximum number of User Variables allowed for each User.intgetMinRoomNameChars()The minimum number of characters allowed for Room namejava.lang.StringgetName()The name of the Zone.PrivilegeManagergetPrivilegeManager()java.lang.ObjectgetProperty(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.RoomgetRoomById(int id)Get a Room from its unique IDRoomgetRoomByName(java.lang.String name)Get a Room from its namejava.util.List<Room>getRoomList()Get the list of Rooms in the ZoneISFSArraygetRoomListData()INTERNALISFSArraygetRoomListData(java.util.List<java.lang.String> groupIds)INTERNALjava.util.List<Room>getRoomListFromGroup(java.lang.String groupId)Get the list of Rooms from a specific Groupjava.util.List<Room>getRoomListFromGroupList(java.util.Collection<java.lang.String> groups)Obtain a Room list generated by merging all Rooms from the provided group namescom.smartfoxserver.v2.entities.managers.IRoomManagergetRoomManager()Obtain a reference to the internal Room ManagerIRoomStoragegetRoomPersistenceApi()Obtain the Room Persistence API object.java.util.Collection<ISession>getSessionList()Get the list of Sessions logged in the Zonejava.util.Collection<ISession>getSessionsInGroup(java.lang.String groupId)Get a list of Sessions from all Rooms in the provided Room Groupjava.util.Collection<ISession>getSessionsListeningToGroup(java.lang.String groupId)Get a list of Sessions listening for events in a specific GroupintgetTotalRoomCount()com.smartfoxserver.v2.util.IResponseThrottlergetUCountThrottler()INTERNALUsergetUserById(int id)Get a User from its unique IDUsergetUserByName(java.lang.String name)Get a User from its nameUsergetUserBySession(ISession session)Get a User from its Session objectintgetUserCount()Get the current amount of Users connected to the ZoneintgetUserCountChangeUpdateInterval()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 Zonecom.smartfoxserver.v2.entities.managers.IUserManagergetUserManager()intgetUserReconnectionSeconds()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 GroupIWordFiltergetWordFilter()INTERNALcom.smartfoxserver.v2.entities.managers.IZoneManagergetZoneManager()voidinitRoomPersistence(RoomStorageMode mode, BaseStorageConfig config)Initializes the Room Persistence functionality.booleanisActive()Checks if the Zone is currently enabled in the system or not.booleanisAllowInvitationsOnlyForBuddies()True if only buddies can be invited by a client side JoinRoomInvitationRequest, false otherwise.booleanisClientAllowedToOverridRoomEvents()booleanisCustomLogin()Check if the Zone fires LOGIN events to the Zone extension at login time.booleanisEncrypted()True if protocol cryptography is turned on in this Zone.booleanisFilterBuddyMessages()Toggle the filtering of Buddy messages via the Words Filter.booleanisFilterChainInited()Returns true if the FilterChain was initializedbooleanisFilterPrivateMessages()If turned on the Zone will apply the Words Filter to private messagesbooleanisFilterRoomNames()If turned on the Zone will apply the Words Filter to Room namesbooleanisFilterUserNames()If turned on the Zone will apply the Words Filter to User names provided at login timebooleanisForceLogout()If turned on it allows a User to connect from another location while another connection is already active.booleanisGeoLocationEnabled()Toggles geolocation for clients.booleanisGroupEventSet(java.lang.String groupId, SFSRoomEvents eventToCheck)Checks whether a specific Room Event for the specified Group is activebooleanisGuestUserAllowed()Check if the Zone allows guest users (those sending no name and no password).booleanisHidden()INTERNALbooleanisLagMonitorKeepAlive()Returns true if the LagMonitor requests are also actively resetting the User's idle timerbooleanisSystemEventAllowed(java.lang.String eventID)INTERNALbooleanisUploadEnabled()True if the Zone supports HTTP uploads.Userlogin(LoginData loginData)INTERNALvoidregisterEventsForRoomGroup(java.lang.String groupId, java.util.Set<SFSRoomEvents> flags)voidremoveAllUsers()voidremoveDisabledSystemEvent(java.lang.String eventID)INTERNALvoidremoveProperty(java.lang.Object key)Remove a property.voidremoveRoom(int roomId)INTERNALvoidremoveRoom(Room room)INTERNALvoidremoveRoom(java.lang.String name)INTERNALvoidremoveUser(int userId)INTERNALvoidremoveUser(ISession session)INTERNALvoidremoveUser(User user)INTERNALvoidremoveUser(java.lang.String userName)INTERNALvoidremoveUserFromRoom(User user, Room room)INTERNALvoidresetSystemFilterChain()Resets the whole SystemController Filter chain.voidsetActive(boolean flag)Changes the state of the Zone.voidsetAllowInvitationsOnlyForBuddies(boolean allowInvitationsOnlyForBuddies)Set to true if only buddies can be invited by a client side JoinRoomInvitationRequest, false otherwise.voidsetBuddyListManager(BuddyListManager buddyListManager)INTERNALvoidsetClientAllowedToOverridRoomEvents(boolean flag)voidsetCustomLogin(boolean flag)Set the Zone as Custom login.voidsetDBManager(IDBManager manager)INTERNALvoidsetDefaultGroups(java.util.List<java.lang.String> groupIDs)voidsetDefaultPlayerIdGeneratorClassName(java.lang.String className)voidsetEncrypted(boolean value)Toggles the protocol cryptography.voidsetExtension(ISFSExtension extension)INTERNALvoidsetFilterBuddyMessages(boolean flag)If turned on the Zone will apply the Words Filter to Buddy messagesvoidsetFilterChain(SystemRequest requestId, ISystemFilterChain chain)Set a SystemFilterChain for a specific SystemController's Request.voidsetFilterPrivateMessages(boolean flag)Toggle the filtering of private messages via the Words Filter.voidsetFilterRoomNames(boolean flag)Toggle the filtering of Room names via the Words Filter.voidsetFilterUserNames(boolean flag)Toggle the filtering of User names via the Words Filter at login time.voidsetForceLogout(boolean flag)If turned on it allows a User to connect from another location while another connection is already active.voidsetGeoLocationEnabled(boolean value)Toggles geolocation for clients.voidsetGuestUserAllowed(boolean flag)Toggles the Zone guest users (login with no name and no password).voidsetGuestUserNamePrefix(java.lang.String prefix)Set the prefix used by the system to auto-generate guest user names.voidsetHidden(boolean flag)INTERNALvoidsetId(int id)A numeric ID used by the AdminTool.voidsetLagMonitorKeepAlive(boolean value)Resets the the Users' idle timer for every client side LagMonitor request, when set to true;voidsetMaxAllowedRooms(int max)Set the maximum number of Rooms that can be created in the Room.voidsetMaxAllowedUsers(int max)Set the maximum number of users allowed to join the Zone.voidsetMaxFailedLogins(int value)Set the max number of login attempts (in the same session) a user can fail before being disconnected.voidsetMaxFindRoomResults(int value)Set the max number of "FindRoom" results for a client request.voidsetMaxFindUserResults(int value)Set the max number of "FindUser" results for a client request.voidsetMaxInvitationsPerRequest(int maxInvitationsPerRequest)Set the max number of people that can be invited a by a single client side JoinRoomInvitationRequestvoidsetMaxRoomNameChars(int max)Set the maximum number of characters allowed for a Room namevoidsetMaxRoomsCreatedPerUserLimit(int max)Set the maximum number of Rooms that a User can create at once.voidsetMaxRoomVariablesAllowed(int max)Set the maximum number of Room variables allowed in the RoomvoidsetMaxUserIdleTime(int seconds)Set the max allowed idle time for a User.voidsetMaxUserVariablesAllowed(int max)Set the maximum number of User Variables allowed for each User.voidsetMinRoomNameChars(int min)Set the minimum number of characters allowed for a Room namevoidsetPrivilegeManager(PrivilegeManager privilegeManager)voidsetProperty(java.lang.Object key, java.lang.Object value)Properties are custom values that can be added or removed from the Zone at run-time.voidsetPublicGroups(java.util.List<java.lang.String> groupIDs)voidsetUploadEnabled(boolean val)Switches on/off the ability to upload data via HTTP.voidsetUserCountChangeUpdateInterval(int interval)Set the rate (in ms.) at which the UserCountUpdates events are fired to the clients.voidsetUserReconnectionSeconds(int seconds)Set the amount of seconds available for a User to reconnect to the system in case their socket connection goes down.voidsetZoneManager(com.smartfoxserver.v2.entities.managers.IZoneManager manager)voidvalidateUserName(java.lang.String name)
 
- 
- 
- 
Method Detail- 
getUserManagercom.smartfoxserver.v2.entities.managers.IUserManager getUserManager() 
 - 
isActiveboolean 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
 
 - 
setActivevoid 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
 
 - 
isHiddenboolean isHidden() INTERNAL
 - 
setHiddenvoid setHidden(boolean flag) INTERNAL
 - 
setIdvoid setId(int id) A numeric ID used by the AdminTool. The true identifier of a Zone is its name- Parameters:
- id- the id
 
 - 
getNamejava.lang.String getName() The name of the Zone. Each Zone must have a unique name.- Returns:
- the name of the Zone.
 
 - 
getIdint getId() A numeric ID used by the AdminTool. The true identifier of a Zone is its name- Returns:
- the id
 
 - 
getMaxAllowedUsersint getMaxAllowedUsers() The maximum number of users allowed to join the Zone.- Returns:
- the maximum number of users allowed to join the Zone.
 
 - 
setMaxAllowedUsersvoid setMaxAllowedUsers(int max) Set the maximum number of users allowed to join the Zone.- Parameters:
- max- the max allowed Users
 
 - 
getMaxAllowedRoomsint 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.
 
 - 
setMaxAllowedRoomsvoid setMaxAllowedRooms(int max) Set the maximum number of Rooms that can be created in the Room.- Parameters:
- max- the maximum number of Rooms that can be created in the Room.
 
 - 
getMaxRoomsCreatedPerUserLimitint 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.
 
 - 
setMaxRoomsCreatedPerUserLimitvoid setMaxRoomsCreatedPerUserLimit(int max) Set the maximum number of Rooms that a User can create at once.- Parameters:
- max- the maximum number of Rooms that a User can create at once.
 
 - 
getMaxUserVariablesAllowedint getMaxUserVariablesAllowed() The maximum number of User Variables allowed for each User.- Returns:
- the maximum number of User Variables allowed for each User.
 
 - 
setMaxUserVariablesAllowedvoid setMaxUserVariablesAllowed(int max) Set the maximum number of User Variables allowed for each User.- Parameters:
- max- the maximum number of User Variables allowed for each User.
 
 - 
getMaxRoomVariablesAllowedint 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.
 
 - 
setMaxRoomVariablesAllowedvoid setMaxRoomVariablesAllowed(int max) Set the maximum number of Room variables allowed in the Room- Parameters:
- 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. 
 
 - 
getMinRoomNameCharsint getMinRoomNameChars() The minimum number of characters allowed for Room name- Returns:
- the minimum number of characters allowed for Room name
 
 - 
setMinRoomNameCharsvoid setMinRoomNameChars(int min) Set the minimum number of characters allowed for a Room name- Parameters:
- min- the minimum number of characters allowed for Room name
 
 - 
getMaxRoomNameCharsint getMaxRoomNameChars() The maximum number of characters allowed for a Room name- Returns:
- the maximum number of characters allowed for a Room name
 
 - 
setMaxRoomNameCharsvoid setMaxRoomNameChars(int max) Set the maximum number of characters allowed for a Room name- Parameters:
- max- the maximum number of characters allowed for a Room name
 
 - 
getUserCountChangeUpdateIntervalint 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
 
 - 
setUserCountChangeUpdateIntervalvoid setUserCountChangeUpdateInterval(int interval) Set the rate (in ms.) at which the UserCountUpdates events are fired to the clients.- Parameters:
- interval- the interval in ms between each UserCountUpdate. Recommended range: 500-2000ms.
 
 - 
getMaxUserIdleTimeint 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
 
 - 
setMaxUserIdleTimevoid setMaxUserIdleTime(int seconds) Set 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.- Parameters:
- seconds- the interval
 
 - 
isCustomLoginboolean 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:
- SFSEvent,- SFSEventType
 
 - 
isForceLogoutboolean 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
 
 - 
setForceLogoutvoid setForceLogout(boolean flag) 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.- Parameters:
- flag-
 
 - 
setCustomLoginvoid setCustomLogin(boolean flag) Set the Zone as Custom login. If turned on the developer's Extension will be able to take control over the login process.- Parameters:
- flag-
- See Also:
- SFSEvent,- SFSEventType
 
 - 
isGuestUserAllowedboolean 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:
- getGuestUserNamePrefix()
 
 - 
setGuestUserAllowedvoid setGuestUserAllowed(boolean flag) Toggles the Zone guest users (login with no name and no password). If active the server will automatically set up a "guest name" for the User.- Parameters:
- flag-
- See Also:
- getGuestUserNamePrefix()
 
 - 
isFilterUserNamesboolean 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
 
 - 
setFilterUserNamesvoid setFilterUserNames(boolean flag) Toggle the filtering of User names via the Words Filter at login time.- Parameters:
- flag-
 
 - 
isFilterRoomNamesboolean isFilterRoomNames() If turned on the Zone will apply the Words Filter to Room names- Returns:
- true if filtering is turned on
 
 - 
setFilterRoomNamesvoid setFilterRoomNames(boolean flag) Toggle the filtering of Room names via the Words Filter.- Parameters:
- flag- a boolean
 
 - 
isFilterPrivateMessagesboolean 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
 
 - 
setFilterPrivateMessagesvoid setFilterPrivateMessages(boolean flag) Toggle the filtering of private messages via the Words Filter.- Parameters:
- flag-
 
 - 
isFilterBuddyMessagesboolean isFilterBuddyMessages() Toggle the filtering of Buddy messages via the Words Filter.- Returns:
- true if buddy messages filtering is turned on
 
 - 
setFilterBuddyMessagesvoid setFilterBuddyMessages(boolean flag) If turned on the Zone will apply the Words Filter to Buddy messages- Parameters:
- flag-
 
 - 
getUserReconnectionSecondsint 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.
 
 - 
setUserReconnectionSecondsvoid setUserReconnectionSeconds(int seconds) Set 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.- Parameters:
- seconds- the amount of seconds to reconnect
 
 - 
getGuestUserNamePrefixjava.lang.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
 
 - 
setGuestUserNamePrefixvoid setGuestUserNamePrefix(java.lang.String prefix) Set 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.- Parameters:
- prefix-
 
 - 
getDefaultPlayerIdGeneratorClassNamejava.lang.String getDefaultPlayerIdGeneratorClassName() 
 - 
setDefaultPlayerIdGeneratorClassNamevoid setDefaultPlayerIdGeneratorClassName(java.lang.String className) 
 - 
isUploadEnabledboolean isUploadEnabled() True if the Zone supports HTTP uploads.- Returns:
- true if the Zone supports HTTP uploads.
 
 - 
setUploadEnabledvoid setUploadEnabled(boolean val) Switches on/off the ability to upload data via HTTP. This in turn causes theSFSEventType.FILE_UPLOADevent to be fired at Zone Level.
 - 
isGeoLocationEnabledboolean isGeoLocationEnabled() Toggles geolocation for clients.- Returns:
- true if geolocation is enabled in this Zone
- Since:
- 2.12
 
 - 
setGeoLocationEnabledvoid setGeoLocationEnabled(boolean value) Toggles geolocation for clients.NOTE:IP address geolocation is done via a local database so the added performance cost is negligible. - Parameters:
- value- true to enable the geolocation service, false to turn it off. Default = false
 
 - 
getPublicGroupsjava.util.List<java.lang.String> 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
 
 - 
setPublicGroupsvoid setPublicGroups(java.util.List<java.lang.String> groupIDs) 
 - 
getGroupsjava.util.List<java.lang.String> 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
 
 - 
getDefaultGroupsjava.util.List<java.lang.String> 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:
- SFSApi.subscribeRoomGroup(User, String)
 
 - 
setDefaultGroupsvoid setDefaultGroups(java.util.List<java.lang.String> groupIDs) 
 - 
getPrivilegeManagerPrivilegeManager getPrivilegeManager() 
 - 
setPrivilegeManagervoid setPrivilegeManager(PrivilegeManager privilegeManager) 
 - 
getUserCountint getUserCount() Get the current amount of Users connected to the Zone- Returns:
- the amount of Users connected to the Zone
 
 - 
getTotalRoomCountint getTotalRoomCount() 
 - 
getGameRoomCountint getGameRoomCount() 
 - 
createRoomRoom createRoom(CreateRoomSettings params) throws SFSCreateRoomException - Throws:
- SFSCreateRoomException
 
 - 
createRoomRoom createRoom(CreateRoomSettings params, User user) throws SFSCreateRoomException - Throws:
- SFSCreateRoomException
 
 - 
isClientAllowedToOverridRoomEventsboolean isClientAllowedToOverridRoomEvents() 
 - 
setClientAllowedToOverridRoomEventsvoid setClientAllowedToOverridRoomEvents(boolean flag) 
 - 
registerEventsForRoomGroupvoid registerEventsForRoomGroup(java.lang.String groupId, java.util.Set<SFSRoomEvents> flags)
 - 
isGroupEventSetboolean isGroupEventSet(java.lang.String groupId, SFSRoomEvents eventToCheck)Checks whether a specific Room Event for the specified Group is active- Parameters:
- groupId- the group name
- eventToCheck- the type of event to check
- Returns:
- true if the event is active
 
 - 
getGroupEventsjava.util.Set<SFSRoomEvents> getGroupEvents(java.lang.String groupId) 
 - 
getRoomManagercom.smartfoxserver.v2.entities.managers.IRoomManager getRoomManager() Obtain a reference to the internal Room Manager- Returns:
- the Room Manager
- Since:
- 2.12
 
 - 
containsGroupboolean containsGroup(java.lang.String groupId) Check if the Zone contains the specified Group- Returns:
- true if the Zone contains the specified Group
 
 - 
containsPublicGroupboolean containsPublicGroup(java.lang.String groupId) Check if the Zone contains the specified public Group- Returns:
- true if the Zone contains the specified public Group
 
 - 
getPropertyjava.lang.Object getProperty(java.lang.Object key) 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
 
 - 
setPropertyvoid 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. 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
- value- the value of the property
 
 - 
containsPropertyboolean containsProperty(java.lang.Object key) Checks the existance of a Zone property- Parameters:
- key- the name of the property
- Returns:
- true if the property exists
 
 - 
removePropertyvoid removeProperty(java.lang.Object key) Remove a property.- Parameters:
- key- the name of the property.
- See Also:
- setProperty(Object, Object)
 
 - 
getZoneManagercom.smartfoxserver.v2.entities.managers.IZoneManager getZoneManager() 
 - 
setZoneManagervoid setZoneManager(com.smartfoxserver.v2.entities.managers.IZoneManager manager) 
 - 
getRoomListjava.util.List<Room> getRoomList() Get the list of Rooms in the Zone- Returns:
- the room list
 
 - 
getRoomListFromGroupjava.util.List<Room> getRoomListFromGroup(java.lang.String groupId) 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
 
 - 
getRoomListFromGroupListjava.util.List<Room> getRoomListFromGroupList(java.util.Collection<java.lang.String> groups) 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
 
 - 
getRoomByIdRoom getRoomById(int id) 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
 
 - 
getRoomByNameRoom getRoomByName(java.lang.String name) Get a Room from its name- Parameters:
- name- the Room name
- Returns:
- the Room or null if no Room exists with the specified name
 
 - 
addRoomvoid addRoom(Room room) throws SFSTooManyRoomsException INTERNALInstead use SFSApi.createRoom(Zone, CreateRoomSettings, User)- Throws:
- SFSTooManyRoomsException
 
 - 
removeRoomvoid removeRoom(Room room) INTERNALInstead use SFSApi.removeRoom(Room)
 - 
removeRoomvoid removeRoom(int roomId) INTERNALInstead use SFSApi.removeRoom(Room)
 - 
removeRoomvoid removeRoom(java.lang.String name) INTERNALInstead use SFSApi.removeRoom(Room)
 - 
checkAndRemovevoid checkAndRemove(Room room) 
 - 
changeRoomNamevoid changeRoomName(Room room, java.lang.String newName) throws SFSRoomException INTERNALInstead use SFSApi.changeRoomName(User, Room, String)- Throws:
- SFSRoomException
 
 - 
changeRoomPasswordStatevoid changeRoomPasswordState(Room room, java.lang.String password) INTERNALInstead use SFSApi.changeRoomPassword(User, Room, String)
 - 
changeRoomCapacityvoid changeRoomCapacity(Room room, int newMaxUsers, int maxMaxSpect) INTERNALInstead use SFSApi.changeRoomCapacity(User, Room, int, int)
 - 
validateUserNamevoid validateUserName(java.lang.String name) throws SFSException- Throws:
- SFSException
 
 - 
getUserByIdUser getUserById(int id) 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
 
 - 
getUserByNameUser getUserByName(java.lang.String name) Get a User from its name- Parameters:
- name- the User name
- Returns:
- the User, or null if no User exists with the provided name
 
 - 
getUserBySessionUser getUserBySession(ISession session) 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.
 
 - 
getUsersInGroupjava.util.Collection<User> getUsersInGroup(java.lang.String groupId) 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
 
 - 
getSessionsInGroupjava.util.Collection<ISession> getSessionsInGroup(java.lang.String groupId) 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
 
 - 
getSessionsListeningToGroupjava.util.Collection<ISession> getSessionsListeningToGroup(java.lang.String groupId) 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
 
 - 
getSessionListjava.util.Collection<ISession> getSessionList() Get the list of Sessions logged in the Zone- Returns:
- the list of Sessions logged in the Zone
 
 - 
getUserListjava.util.Collection<User> getUserList() Get the list of Users logged in the Zone- Returns:
- the list of Users logged in the Zone
 
 - 
removeAllUsersvoid removeAllUsers() 
 - 
getFilterChainISystemFilterChain getFilterChain(SystemRequest requestId) 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
- Since:
- version 2.3.0
- See Also:
- ISystemFilterChain,- ISystemFilter
 
 - 
setFilterChainvoid setFilterChain(SystemRequest requestId, ISystemFilterChain chain) 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 Id
- chain- the filter chain
- Since:
- version 2.3.0
- See Also:
- SysControllerFilterChain,- SysControllerFilter
 
 - 
isFilterChainInitedboolean isFilterChainInited() Returns true if the FilterChain was initialized- Returns:
- true if at least one Filter was added to the FilterChain
- Since:
- version 2.3.0
 
 - 
resetSystemFilterChainvoid resetSystemFilterChain() Resets the whole SystemController Filter chain. All filters for any SystemRequest is removed.
 - 
removeUservoid removeUser(int userId) INTERNALInstead use SFSApi.disconnectUser(User)
 - 
removeUservoid removeUser(java.lang.String userName) INTERNALInstead use SFSApi.disconnectUser(User)
 - 
removeUservoid removeUser(ISession session) INTERNALInstead use SFSApi.disconnect(ISession)
 - 
removeUservoid removeUser(User user) INTERNALInstead use SFSApi.disconnectUser(User)
 - 
removeUserFromRoomvoid removeUserFromRoom(User user, Room room) INTERNALInstead use SFSApi.leaveRoom(User, Room)
 - 
getUCountThrottlercom.smartfoxserver.v2.util.IResponseThrottler getUCountThrottler() INTERNAL
 - 
getWordFilterIWordFilter getWordFilter() INTERNAL
 - 
getFloodFilterIFloodFilter getFloodFilter() INTERNAL
 - 
getExtensionISFSExtension getExtension() INTERNAL
 - 
setExtensionvoid setExtension(ISFSExtension extension) INTERNAL
 - 
getDBManagerIDBManager getDBManager() Obtain a reference to the Zone's Database Manager.- See Also:
- SFSDBManager
 
 - 
setDBManagervoid setDBManager(IDBManager manager) INTERNAL
 - 
initRoomPersistencevoid initRoomPersistence(RoomStorageMode mode, BaseStorageConfig config) 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.
- Since:
- 2.8.0
- See Also:
- RoomStorageMode,- SFSDBManager,- IRoomStorage
 
 - 
getRoomPersistenceApiIRoomStorage 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.
- Since:
- 2.8.0
- See Also:
- initRoomPersistence(RoomStorageMode, BaseStorageConfig),- IRoomStorage
 
 - 
addDisabledSystemEventvoid addDisabledSystemEvent(java.lang.String eventID) INTERNAL
 - 
removeDisabledSystemEventvoid removeDisabledSystemEvent(java.lang.String eventID) INTERNAL
 - 
isSystemEventAllowedboolean isSystemEventAllowed(java.lang.String eventID) INTERNAL
 - 
loginUser login(LoginData loginData) throws SFSLoginException INTERNALInstead use SFSApi.login(ISession, String, String, String, com.smartfoxserver.v2.entities.data.ISFSObject)- Throws:
- SFSLoginException
 
 - 
getRoomListDataISFSArray getRoomListData() INTERNAL
 - 
getRoomListDataISFSArray getRoomListData(java.util.List<java.lang.String> groupIds) INTERNAL
 - 
getBuddyListManagerBuddyListManager getBuddyListManager() INTERNALInstead use SFSBuddyApi
 - 
setBuddyListManagervoid setBuddyListManager(BuddyListManager buddyListManager) INTERNAL
 - 
isEncryptedboolean 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:
- returns true if protocol cryptography is turned on in this Zone
- Since:
- 2.10
 
 - 
setEncryptedvoid setEncrypted(boolean value) Toggles the protocol cryptography.- Parameters:
- value- toggles protocol cryptography.
- Since:
- 2.10
 
 - 
getMaxInvitationsPerRequestint 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
- Since:
- 2.12
 
 - 
setMaxInvitationsPerRequestvoid setMaxInvitationsPerRequest(int maxInvitationsPerRequest) Set the max number of people that can be invited a by a single client side JoinRoomInvitationRequest- Parameters:
- maxInvitationsPerRequest- the max number of people that can be invited in each request
- Since:
- 2.12
 
 - 
isAllowInvitationsOnlyForBuddiesboolean 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.
- Since:
- 2.12
 
 - 
setAllowInvitationsOnlyForBuddiesvoid setAllowInvitationsOnlyForBuddies(boolean allowInvitationsOnlyForBuddies) Set to true if only buddies can be invited by a client side JoinRoomInvitationRequest, false otherwise.- Parameters:
- allowInvitationsOnlyForBuddies-
- Since:
- 2.12
 
 - 
getMaxFailedLoginsint 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.
- Since:
- 2.12
 
 - 
setMaxFailedLoginsvoid setMaxFailedLogins(int value) Set the max number of login attempts (in the same session) a user can fail before being disconnected.- Parameters:
- value- the max number of login attempts (in the same session) a user can fail before being disconnected.
- Since:
- 2.12
 
 - 
getMaxFindUserResultsint getMaxFindUserResults() Get the max number of "Find User" results for a client request. Default is 50.- Parameters:
- the- max number of results for "Find User" requests from client side.
- Since:
- 2.14
 
 - 
setMaxFindUserResultsvoid setMaxFindUserResults(int value) Set the max number of "FindUser" results for a client request. Default is 50.- Parameters:
- the- max number of results for "FindUser" requests from client side.
- Since:
- 2.14
 
 - 
getMaxFindRoomResultsint getMaxFindRoomResults() Get the max number of "FindRoom" results for a client request. Default is 50.- Parameters:
- the- max number of results for "FindRoom" requests from client side.
- Since:
- 2.14
 
 - 
setMaxFindRoomResultsvoid setMaxFindRoomResults(int value) Set the max number of "FindRoom" results for a client request. Default is 50.- Parameters:
- the- max number of results for "FindRoom" requests from client side.
- Since:
- 2.14
 
 - 
isLagMonitorKeepAliveboolean isLagMonitorKeepAlive() Returns true if the LagMonitor requests are also actively resetting the User's idle timer- Since:
- 2.18.2
 
 - 
setLagMonitorKeepAlivevoid setLagMonitorKeepAlive(boolean value) Resets the the Users' idle timer for every client side LagMonitor request, when set to true;- Parameters:
- value- whether or not the LagMonitor requests should reset the User's idle timer
 
 - 
getDumpjava.lang.String getDump() 
 
- 
 
-