public interface BuddyListManager
extends com.smartfoxserver.bitswarm.service.IService
Modifier and Type | Method and Description |
---|---|
Buddy |
addBuddy(java.lang.String ownerName,
java.lang.String buddyName,
boolean isTemp)
Use the SFSBuddyAPI
|
boolean |
allowOfflineBuddyVariables()
Check if the "offline" (persistent) Buddy Variables are supported in the current Zone
|
boolean |
getApplyBadWordsFilter()
Check if the current Zone applies the WordFilter to the Buddy messages
|
BuddyList |
getBuddyList(java.lang.String ownerName)
Get the Buddy List of a specific user
|
int |
getBuddyListMaxSize()
Get the maximum size of a BuddyList
|
java.util.List<java.lang.String> |
getBuddyStates()
Get a list of custom Buddy states such as "Available", "Occupied", "Be right back" etc...
|
java.util.List<ISession> |
getClientsWatchingBuddy(java.lang.String buddyName) |
java.util.List<ISession> |
getClientsWatchingBuddy(java.lang.String buddyName,
boolean onlineUsersOnly) |
int |
getMaxBuddyVariables()
Get the limit of BuddyVariables that each User can create
|
BuddyVariable |
getOfflineBuddyVariable(java.lang.String ownerName,
java.lang.String varName) |
java.util.List<BuddyVariable> |
getOfflineBuddyVariables(java.lang.String ownerName) |
java.util.List<BuddyVariable> |
getOfflineBuddyVariables(java.lang.String ownerName,
boolean bypassCache) |
int |
getOfflineBuddyVariablesCacheSize()
Get the size of the "offline" Buddy Variables cache.
|
java.util.List<java.lang.String> |
getRecipientNamesForUpdate(java.lang.String owner) |
BuddyStorage |
getStorageHandler()
Get a reference to the instance of the BuddyStorage class, which handles the data persistence
|
boolean |
getUseTempBuddies()
Check if the current Zone supports temporary Buddies
|
Zone |
getZone()
Get the parent Zone
|
boolean |
isActive()
Check if the BuddyList management is active in the Zone
|
BuddyList |
loadBuddyList(java.lang.String ownerName)
Use the SFSBuddyAPI
|
Buddy |
removeBuddy(java.lang.String ownerName,
java.lang.String buddyName)
Use the SFSBuddyAPI
|
void |
removeBuddyList(java.lang.String ownerName) |
void |
saveAll()
This is called automatically by the system
|
void |
saveBuddyList(java.lang.String ownerName)
This is called automatically by the system
|
void |
setActive(boolean value) |
void |
setAllowOfflineBuddyVariables(boolean value) |
void |
setApplyBadWordsFilter(boolean value) |
void |
setBuddyListMaxSize(int maxSize) |
void |
setBuddyStates(java.util.List<java.lang.String> states) |
void |
setMaxBuddyVariables(int maxVariables) |
void |
setOfflineBuddyVariablesCacheSize(int size) |
void |
setStorageHandler(BuddyStorage buddyStorage) |
void |
setUseTempBuddies(boolean value) |
Zone getZone()
int getBuddyListMaxSize()
void setBuddyListMaxSize(int maxSize)
int getOfflineBuddyVariablesCacheSize()
void setOfflineBuddyVariablesCacheSize(int size)
int getMaxBuddyVariables()
void setMaxBuddyVariables(int maxVariables)
boolean isActive()
void setActive(boolean value)
boolean allowOfflineBuddyVariables()
void setAllowOfflineBuddyVariables(boolean value)
BuddyStorage getStorageHandler()
void setStorageHandler(BuddyStorage buddyStorage)
Buddy addBuddy(java.lang.String ownerName, java.lang.String buddyName, boolean isTemp) throws SFSBuddyListException
Buddy removeBuddy(java.lang.String ownerName, java.lang.String buddyName)
BuddyList getBuddyList(java.lang.String ownerName)
ownerName
- the user namevoid removeBuddyList(java.lang.String ownerName)
BuddyList loadBuddyList(java.lang.String ownerName) throws java.io.IOException
java.io.IOException
SFSBuddyApi.initBuddyList(com.smartfoxserver.v2.entities.User, boolean)
void saveBuddyList(java.lang.String ownerName) throws java.io.IOException
java.io.IOException
void saveAll()
java.util.List<BuddyVariable> getOfflineBuddyVariables(java.lang.String ownerName)
java.util.List<BuddyVariable> getOfflineBuddyVariables(java.lang.String ownerName, boolean bypassCache)
BuddyVariable getOfflineBuddyVariable(java.lang.String ownerName, java.lang.String varName)
java.util.List<ISession> getClientsWatchingBuddy(java.lang.String buddyName)
java.util.List<ISession> getClientsWatchingBuddy(java.lang.String buddyName, boolean onlineUsersOnly)
java.util.List<java.lang.String> getBuddyStates()
void setBuddyStates(java.util.List<java.lang.String> states)
boolean getUseTempBuddies()
void setUseTempBuddies(boolean value)
boolean getApplyBadWordsFilter()
SFSBuddyApi.sendBuddyMessage(com.smartfoxserver.v2.entities.User, com.smartfoxserver.v2.entities.User, String, com.smartfoxserver.v2.entities.data.ISFSObject)
void setApplyBadWordsFilter(boolean value)
java.util.List<java.lang.String> getRecipientNamesForUpdate(java.lang.String owner)