Interface Buddy

All Known Implementing Classes:
SFSBuddy

public interface Buddy

In the SmartFoxServer 3 client API this interface is implemented by the SFSBuddy class.

See Also:
  • Method Details

    • getId

      int getId()
      The buddy id. This is equal to the id assigned by SmartFoxServer to the corresponding User.
      See Also:
    • getName

      String getName()
      The name of this buddy. This is equal to the login name of the corresponding User.
      See Also:
    • getDisplayName

      String getDisplayName()
      If a Buddy nickname exists returns that nickname, otherwise returns the User's login name.
      Returns:
      the nickname (if any), otherwise the User's name.
    • isBlocked

      boolean isBlocked()
      Indicates whether this buddy is blocked in the current user's buddies list or not. A buddy can be blocked by means of a BlockBuddyRequest request.
      See Also:
    • isOnline

      boolean isOnline()
      Indicates whether this buddy is online in the Buddy List system or not.
    • isTemp

      boolean isTemp()
      Indicates whether this buddy is temporary (non-persistent) in the current user's buddies list or not.
    • getState

      String getState()
      Returns the custom state of this buddy. Examples of custom states are "Available", "Busy", "Be right back", etc. If the custom state is not set, null is returned.

      The list of available custom states is returned by the IBuddyManager.buddyStates property.

      See Also:
    • getNickName

      String getNickName()
      Returns the nickname of this buddy. If the nickname is not set, null is returned.
    • getVariables

      List<BuddyVariable> getVariables()
      Returns a list of BuddyVariable objects associated with the buddy.
      See Also:
    • getVariable

      BuddyVariable getVariable(String varName)
      Retrieves a Buddy Variable from its name.
      Parameters:
      varName - The name of the Buddy Variable to be retrieved.
      Returns:
      The BuddyVariable object representing the Buddy Variable, or null if no Buddy Variable with the passed name is associated with this buddy.
      See Also:
    • containsVariable

      boolean containsVariable(String varName)
      Indicates whether this buddy has the specified Buddy Variable set or not.
      Parameters:
      varName - The name of the Buddy Variable whose existence must be checked.
      Returns:
      true if a Buddy Variable with the passed name is set for this buddy.
    • getOfflineVariables

      List<BuddyVariable> getOfflineVariables()
      Retrieves the list of persistent Buddy Variables of this buddy.
      Returns:
      A List of BuddyVariable objects.
      See Also:
    • getOnlineVariables

      List<BuddyVariable> getOnlineVariables()
      Retrieves the list of non-persistent Buddy Variables of this buddy.
      Returns:
      A List of BuddyVariable objects.
      See Also:
    • setVariable

      void setVariable(BuddyVariable bVar)
      Internal
    • setVariables

      void setVariables(List<BuddyVariable> variables)
      Internal
    • setId

      void setId(int id)
      Internal
    • setBlocked

      void setBlocked(boolean blocked)
      Internal
    • removeVariable

      void removeVariable(String varName)
      Internal
    • clearVolatileVariables

      void clearVolatileVariables()
      Internal