Interface BuddyListManager

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

    public interface BuddyListManager
    extends com.smartfoxserver.bitswarm.service.IService
    • Method Detail

      • 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)
      • getBuddyList

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

        void removeBuddyList​(java.lang.String ownerName)
      • saveBuddyList

        void saveBuddyList​(java.lang.String ownerName)
                    throws java.io.IOException
        This is called automatically by the system
        Throws:
        java.io.IOException
      • saveAll

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

        java.util.List<BuddyVariable> getOfflineBuddyVariables​(java.lang.String ownerName)
      • getOfflineBuddyVariables

        java.util.List<BuddyVariable> getOfflineBuddyVariables​(java.lang.String ownerName,
                                                               boolean bypassCache)
      • getOfflineBuddyVariable

        BuddyVariable getOfflineBuddyVariable​(java.lang.String ownerName,
                                              java.lang.String varName)
      • getClientsWatchingBuddy

        java.util.List<ISession> getClientsWatchingBuddy​(java.lang.String buddyName)
      • getClientsWatchingBuddy

        java.util.List<ISession> getClientsWatchingBuddy​(java.lang.String buddyName,
                                                         boolean onlineUsersOnly)
      • getBuddyStates

        java.util.List<java.lang.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​(java.util.List<java.lang.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)
      • setApplyBadWordsFilter

        void setApplyBadWordsFilter​(boolean value)
      • getRecipientNamesForUpdate

        java.util.List<java.lang.String> getRecipientNamesForUpdate​(java.lang.String owner)