Class RosterUtil

java.lang.Object
org.jivesoftware.smack.roster.RosterUtil

public class RosterUtil extends Object
  • Constructor Details

    • RosterUtil

      public RosterUtil()
  • Method Details

    • waitUntilOtherEntityIsSubscribed

      public static void waitUntilOtherEntityIsSubscribed(Roster roster, org.jxmpp.jid.BareJid otherEntity, long timeoutMillis) throws InterruptedException, TimeoutException
      Throws:
      InterruptedException
      TimeoutException
    • waitUntilOtherEntityIsSubscribed

      public static void waitUntilOtherEntityIsSubscribed(Roster roster, org.jxmpp.jid.BareJid otherEntity, Date deadline) throws InterruptedException, TimeoutException
      Throws:
      InterruptedException
      TimeoutException
    • preApproveSubscriptionIfRequiredAndPossible

      public static void preApproveSubscriptionIfRequiredAndPossible(Roster roster, org.jxmpp.jid.BareJid jid) throws org.jivesoftware.smack.SmackException.NotLoggedInException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Pre-approve the subscription if it is required and possible.
      Parameters:
      roster - The roster which should be used for the pre-approval.
      jid - The XMPP address which should be pre-approved.
      Throws:
      org.jivesoftware.smack.SmackException.NotLoggedInException - if the XMPP connection is not authenticated.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
      Since:
      4.2.2
    • askForSubscriptionIfRequired

      public static void askForSubscriptionIfRequired(Roster roster, org.jxmpp.jid.BareJid jid) throws org.jivesoftware.smack.SmackException.NotLoggedInException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Throws:
      org.jivesoftware.smack.SmackException.NotLoggedInException
      org.jivesoftware.smack.SmackException.NotConnectedException
      InterruptedException
    • ensureNotSubscribedToEachOther

      public static void ensureNotSubscribedToEachOther(org.jivesoftware.smack.XMPPConnection connectionOne, org.jivesoftware.smack.XMPPConnection connectionTwo) throws org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Throws:
      org.jivesoftware.smack.SmackException.NotConnectedException
      InterruptedException
    • ensureNotSubscribed

      public static void ensureNotSubscribed(Roster roster, org.jxmpp.jid.BareJid jid) throws org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Throws:
      org.jivesoftware.smack.SmackException.NotConnectedException
      InterruptedException
    • ensureSubscribed

      public static void ensureSubscribed(org.jivesoftware.smack.XMPPConnection connectionOne, org.jivesoftware.smack.XMPPConnection connectionTwo, long timeout) throws org.jivesoftware.smack.SmackException.NotLoggedInException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException, TimeoutException
      Throws:
      org.jivesoftware.smack.SmackException.NotLoggedInException
      org.jivesoftware.smack.SmackException.NotConnectedException
      InterruptedException
      TimeoutException
    • ensureSubscribedTo

      public static void ensureSubscribedTo(org.jivesoftware.smack.XMPPConnection connectionOne, org.jivesoftware.smack.XMPPConnection connectionTwo, long timeout) throws org.jivesoftware.smack.SmackException.NotLoggedInException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException, TimeoutException
      Throws:
      org.jivesoftware.smack.SmackException.NotLoggedInException
      org.jivesoftware.smack.SmackException.NotConnectedException
      InterruptedException
      TimeoutException
    • ensureSubscribedTo

      public static void ensureSubscribedTo(org.jivesoftware.smack.XMPPConnection connectionOne, org.jivesoftware.smack.XMPPConnection connectionTwo, Date deadline) throws org.jivesoftware.smack.SmackException.NotLoggedInException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException, TimeoutException
      Throws:
      org.jivesoftware.smack.SmackException.NotLoggedInException
      org.jivesoftware.smack.SmackException.NotConnectedException
      InterruptedException
      TimeoutException