it.gotoandplay.smartfoxserver.extensions.examples
Class BasicBuddyPersister

java.lang.Object
  extended by it.gotoandplay.smartfoxserver.data.buddylist.persistence.AbstractBuddyPersister
      extended by it.gotoandplay.smartfoxserver.extensions.examples.BasicBuddyPersister
All Implemented Interfaces:
IBuddyListPersister, it.gotoandplay.smartfoxserver.lib.IService

public class BasicBuddyPersister
extends AbstractBuddyPersister


Constructor Summary
BasicBuddyPersister()
           
 
Method Summary
 void destroy(java.lang.Object param)
           
 void init(java.lang.Object param)
           
 StorableBuddyList loadList(java.lang.String userName)
          Load the buddy list for the specified user
 boolean saveList(java.lang.String userName, StorableBuddyList buddyList)
          Save the buddy list of for the specified user
 
Methods inherited from class it.gotoandplay.smartfoxserver.data.buddylist.persistence.AbstractBuddyPersister
getOfflineVariables, removeOfflineBuddy, saveAll, setZoneName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicBuddyPersister

public BasicBuddyPersister()
Method Detail

init

public void init(java.lang.Object param)
Specified by:
init in interface it.gotoandplay.smartfoxserver.lib.IService
Overrides:
init in class AbstractBuddyPersister

destroy

public void destroy(java.lang.Object param)
Specified by:
destroy in interface it.gotoandplay.smartfoxserver.lib.IService
Overrides:
destroy in class AbstractBuddyPersister

loadList

public StorableBuddyList loadList(java.lang.String userName)
Description copied from interface: IBuddyListPersister
Load the buddy list for the specified user

Specified by:
loadList in interface IBuddyListPersister
Overrides:
loadList in class AbstractBuddyPersister
Parameters:
userName - the user name
Returns:
a list of buddies or null if buddy list does not exist

saveList

public boolean saveList(java.lang.String userName,
                        StorableBuddyList buddyList)
Description copied from interface: IBuddyListPersister
Save the buddy list of for the specified user

Specified by:
saveList in interface IBuddyListPersister
Overrides:
saveList in class AbstractBuddyPersister
Parameters:
userName - the user name
buddyList - the list of buddies