Package com.smartfoxserver.buddylist
Interface BuddyProperties
- All Known Implementing Classes:
SFSBuddyProperties
public interface BuddyProperties
The BuddyProperties class is attached to each User and represents the Buddy status of each User.
In other words these data will reflect in every BuddyList where the user was added.
An example is the on-line/off-line status or the BuddyVariables or the Status String which are all common.
This allows us to have a central place where these informations are stored at runtime instead of adding them to
each Buddy object created in every BuddyList.
-----------------------------------------------------------------------------------------
Fundamentally the BuddyProperties object is simply a wrapper for the buddy variables.
-----------------------------------------------------------------------------------------
In fact all of the exposed properties:
- isOnline
- getState
- getNickname
are nothing but persistent BuddyVariables using special "reserved" keys.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsVariable(String varName) getState()getVariable(String varName) intvoidbooleanbooleanisInited()booleanisOnline()voidremoveVariable(String varName) voidsetChangedSinceLastSave(boolean flag) voidvoidsetNickName(String buddyNickName) voidsetOnline(boolean flag) voidvoidsetVariable(BuddyVariable buddyVariable) voidsetVariables(List<BuddyVariable> buddyVariables)
-
Method Details
-
init
-
isOnline
boolean isOnline() -
setOnline
void setOnline(boolean flag) -
getState
String getState() -
setState
-
getNickName
String getNickName() -
setNickName
-
getVariable
-
getVariables
List<BuddyVariable> getVariables() -
setVariable
-
getPersistentVariables
List<BuddyVariable> getPersistentVariables() -
setVariables
-
removeVariable
-
containsVariable
-
getVariablesCount
int getVariablesCount() -
isChangedSinceLastSave
boolean isChangedSinceLastSave() -
setChangedSinceLastSave
void setChangedSinceLastSave(boolean flag) -
isInited
boolean isInited() -
setInited
void setInited()
-