|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.gotoandplay.smartfoxserver.data.buddylist.persistence.AbstractBuddyPersister
public class AbstractBuddyPersister
This is the base class of a Buddy List persister. It provides concrete implementation of a few interface methods, leaving the remaining implementation to the child class.
The following methods should be overridden:
| Constructor Summary | |
|---|---|
AbstractBuddyPersister()
|
|
| Method Summary | |
|---|---|
void |
destroy(java.lang.Object param)
|
java.util.Map<java.lang.String,java.lang.String> |
getOfflineVariables(java.lang.String userName)
Return a map of off-line variables. |
void |
init(java.lang.Object param)
|
StorableBuddyList |
loadList(java.lang.String userName)
Load the buddy list for the specified user |
boolean |
removeOfflineBuddy(java.lang.String owner,
java.lang.String buddyName)
Removes a buddy from a user list when the user is off-line |
void |
saveAll(java.util.Map<java.lang.String,StorableBuddyList> buddyLists)
This method is invoked when shutting down the Buddy List Manager, it saves all the buddy lists. |
boolean |
saveList(java.lang.String userName,
StorableBuddyList buddyList)
Save the buddy list of for the specified user |
void |
setZoneName(java.lang.String zoneName)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractBuddyPersister()
| Method Detail |
|---|
public void setZoneName(java.lang.String zoneName)
public void init(java.lang.Object param)
init in interface it.gotoandplay.smartfoxserver.lib.IServicepublic void destroy(java.lang.Object param)
destroy in interface it.gotoandplay.smartfoxserver.lib.IServicepublic StorableBuddyList loadList(java.lang.String userName)
IBuddyListPersister
loadList in interface IBuddyListPersisteruserName - the user name
public java.util.Map<java.lang.String,java.lang.String> getOfflineVariables(java.lang.String userName)
IBuddyListPersister
getOfflineVariables in interface IBuddyListPersisteruserName - owner of the variables
public boolean removeOfflineBuddy(java.lang.String owner,
java.lang.String buddyName)
IBuddyListPersister
removeOfflineBuddy in interface IBuddyListPersisterowner - the buddy list ownerbuddyName - the buddy name
public void saveAll(java.util.Map<java.lang.String,StorableBuddyList> buddyLists)
saveAll in interface IBuddyListPersisterbuddyLists - a map of buddy lists where the key is the user name and the value is the buddy list.
public boolean saveList(java.lang.String userName,
StorableBuddyList buddyList)
IBuddyListPersister
saveList in interface IBuddyListPersisteruserName - the user namebuddyList - the list of buddies
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||