Package com.smartfoxserver.buddylist
Interface BuddyListManager
- All Superinterfaces:
com.smartfoxserver.bitswarm.service.IService
- All Known Implementing Classes:
SFSBuddyListManager
public interface BuddyListManager
extends com.smartfoxserver.bitswarm.service.IService
-
Method Summary
Modifier and TypeMethodDescriptionUse the SFSBuddyAPIbooleanCheck if the "offline" (persistent) Buddy Variables are supported in the current ZonebooleanCheck if the current Zone applies the WordFilter to the Buddy messagesgetBuddyList(String ownerName) Get the Buddy List of a specific userintGet the maximum size of a BuddyListGet a list of custom Buddy states such as "Available", "Occupied", "Be right back" etc...getClientsWatchingBuddy(String buddyName) getClientsWatchingBuddy(String buddyName, boolean onlineUsersOnly) intGet the limit of BuddyVariables that each User can creategetOfflineBuddyVariable(String ownerName, String varName) getOfflineBuddyVariables(String ownerName) getOfflineBuddyVariables(String ownerName, boolean bypassCache) intGet the size of the "offline" Buddy Variables cache.getRecipientNamesForUpdate(String owner) Get a reference to the instance of the BuddyStorage class, which handles the data persistencebooleanCheck if the current Zone supports temporary BuddiesgetZone()Get the parent ZonebooleanisActive()Check if the BuddyList management is active in the ZoneloadBuddyList(String ownerName) Use the SFSBuddyAPIremoveBuddy(String ownerName, String buddyName) Use the SFSBuddyAPIvoidremoveBuddyList(String ownerName) voidsaveAll()This is called automatically by the systemvoidsaveBuddyList(String ownerName) This is called automatically by the systemvoidsetActive(boolean value) voidsetAllowOfflineBuddyVariables(boolean value) voidsetApplyBadWordsFilter(boolean value) voidsetBuddyListMaxSize(int maxSize) voidsetBuddyStates(List<String> states) voidsetMaxBuddyVariables(int maxVariables) voidsetOfflineBuddyVariablesCacheSize(int size) voidsetStorageHandler(BuddyStorage buddyStorage) voidsetUseTempBuddies(boolean value) Methods inherited from interface com.smartfoxserver.bitswarm.service.IService
destroy, getName, handleMessage, init, setName
-
Method Details
-
getZone
Zone getZone()Get the parent Zone- Returns:
- the parent Zone
-
getBuddyListMaxSize
int getBuddyListMaxSize()Get the maximum size of a BuddyList- Returns:
- the maximum size of a BuddyList
-
setBuddyListMaxSize
void setBuddyListMaxSize(int maxSize) -
getOfflineBuddyVariablesCacheSize
int getOfflineBuddyVariablesCacheSize()Get the size of the "offline" Buddy Variables cache.- Returns:
- the size of the "offline" Buddy Variables cache.
-
setOfflineBuddyVariablesCacheSize
void setOfflineBuddyVariablesCacheSize(int size) -
getMaxBuddyVariables
int getMaxBuddyVariables()Get the limit of BuddyVariables that each User can create- Returns:
- the limit of BuddyVariables that each User can create
-
setMaxBuddyVariables
void setMaxBuddyVariables(int maxVariables) -
isActive
boolean isActive()Check if the BuddyList management is active in the Zone- Returns:
- true if the BuddyList management is active in the Zone
-
setActive
void setActive(boolean value) -
allowOfflineBuddyVariables
boolean allowOfflineBuddyVariables()Check if the "offline" (persistent) Buddy Variables are supported in the current Zone- Returns:
- true if the "offline" (persistent) Buddy Variables are supported in the current Zone
-
setAllowOfflineBuddyVariables
void setAllowOfflineBuddyVariables(boolean value) -
getStorageHandler
BuddyStorage getStorageHandler()Get a reference to the instance of the BuddyStorage class, which handles the data persistence- Returns:
- a reference to the instance of the BuddyStorage class, which handles the data persistence
-
setStorageHandler
-
addBuddy
Use the SFSBuddyAPI- Throws:
SFSBuddyListException- See Also:
-
removeBuddy
Use the SFSBuddyAPI -
getBuddyList
Get the Buddy List of a specific user- Parameters:
ownerName- the user name- Returns:
- the Buddy List
-
removeBuddyList
-
loadBuddyList
Use the SFSBuddyAPI- Throws:
IOException- See Also:
-
saveBuddyList
This is called automatically by the system- Throws:
IOException
-
saveAll
void saveAll()This is called automatically by the system -
getOfflineBuddyVariables
-
getOfflineBuddyVariables
-
getOfflineBuddyVariable
-
getClientsWatchingBuddy
-
getClientsWatchingBuddy
-
getBuddyStates
Get a list of custom Buddy states such as "Available", "Occupied", "Be right back" etc... These states are defined in the Zone configuration and are transmitted to the client upon Buddy List initialization.- Returns:
- a list of custom Buddy states
-
setBuddyStates
-
getUseTempBuddies
boolean getUseTempBuddies()Check if the current Zone supports temporary Buddies- Returns:
- true if the current Zone supports temporary Buddies
-
setUseTempBuddies
void setUseTempBuddies(boolean value) -
getApplyBadWordsFilter
boolean getApplyBadWordsFilter()Check if the current Zone applies the WordFilter to the Buddy messages- Returns:
- true if the current Zone applies the WordFilter to the Buddy messages
- See Also:
-
setApplyBadWordsFilter
void setApplyBadWordsFilter(boolean value) -
getRecipientNamesForUpdate
-