Class SharedGroupManager

java.lang.Object
org.jivesoftware.smackx.sharedgroups.SharedGroupManager

public class SharedGroupManager extends Object
A SharedGroupManager provides services for discovering the shared groups where a user belongs.

Important note: This functionality is not part of the XMPP spec and it will only work with Wildfire.

  • Constructor Details

    • SharedGroupManager

      public SharedGroupManager()
  • Method Details

    • getSharedGroups

      public static List<String> getSharedGroups(org.jivesoftware.smack.XMPPConnection connection) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Returns the collection that will contain the name of the shared groups where the user logged in with the specified session belongs.
      Parameters:
      connection - connection to use to get the user's shared groups.
      Returns:
      collection with the shared groups' name of the logged user.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.