Interface BuddyListManager

All Superinterfaces:
com.smartfoxserver.bitswarm.service.IService
All Known Implementing Classes:
SFSBuddyListManager

public interface BuddyListManager extends com.smartfoxserver.bitswarm.service.IService
  • 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

      void setStorageHandler(BuddyStorage buddyStorage)
    • addBuddy

      Buddy addBuddy(String ownerName, String buddyName, boolean isTemp) throws SFSBuddyListException
      Use the SFSBuddyAPI
      Throws:
      SFSBuddyListException
      See Also:
    • removeBuddy

      Buddy removeBuddy(String ownerName, String buddyName)
      Use the SFSBuddyAPI
    • getBuddyList

      BuddyList getBuddyList(String ownerName)
      Get the Buddy List of a specific user
      Parameters:
      ownerName - the user name
      Returns:
      the Buddy List
    • removeBuddyList

      void removeBuddyList(String ownerName)
    • loadBuddyList

      BuddyList loadBuddyList(String ownerName) throws IOException
      Use the SFSBuddyAPI
      Throws:
      IOException
      See Also:
    • saveBuddyList

      void saveBuddyList(String ownerName) throws IOException
      This is called automatically by the system
      Throws:
      IOException
    • saveAll

      void saveAll()
      This is called automatically by the system
    • getOfflineBuddyVariables

      List<BuddyVariable> getOfflineBuddyVariables(String ownerName)
    • getOfflineBuddyVariables

      List<BuddyVariable> getOfflineBuddyVariables(String ownerName, boolean bypassCache)
    • getOfflineBuddyVariable

      BuddyVariable getOfflineBuddyVariable(String ownerName, String varName)
    • getClientsWatchingBuddy

      List<ISession> getClientsWatchingBuddy(String buddyName)
    • getClientsWatchingBuddy

      List<ISession> getClientsWatchingBuddy(String buddyName, boolean onlineUsersOnly)
    • getBuddyStates

      List<String> 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

      void setBuddyStates(List<String> states)
    • 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

      List<String> getRecipientNamesForUpdate(String owner)