Package org.jivesoftware.smack.roster
Class RosterUtil
java.lang.Object
org.jivesoftware.smack.roster.RosterUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaskForSubscriptionIfRequired(Roster roster, org.jxmpp.jid.BareJid jid) static voidensureNotSubscribed(Roster roster, org.jxmpp.jid.BareJid jid) static voidensureNotSubscribedToEachOther(org.jivesoftware.smack.XMPPConnection connectionOne, org.jivesoftware.smack.XMPPConnection connectionTwo) static voidensureSubscribed(org.jivesoftware.smack.XMPPConnection connectionOne, org.jivesoftware.smack.XMPPConnection connectionTwo, long timeout) static voidensureSubscribedTo(org.jivesoftware.smack.XMPPConnection connectionOne, org.jivesoftware.smack.XMPPConnection connectionTwo, long timeout) static voidensureSubscribedTo(org.jivesoftware.smack.XMPPConnection connectionOne, org.jivesoftware.smack.XMPPConnection connectionTwo, Date deadline) static voidpreApproveSubscriptionIfRequiredAndPossible(Roster roster, org.jxmpp.jid.BareJid jid) Pre-approve the subscription if it is required and possible.static voidwaitUntilOtherEntityIsSubscribed(Roster roster, org.jxmpp.jid.BareJid otherEntity, long timeoutMillis) static voidwaitUntilOtherEntityIsSubscribed(Roster roster, org.jxmpp.jid.BareJid otherEntity, Date deadline)
-
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:
InterruptedExceptionTimeoutException
-
waitUntilOtherEntityIsSubscribed
public static void waitUntilOtherEntityIsSubscribed(Roster roster, org.jxmpp.jid.BareJid otherEntity, Date deadline) throws InterruptedException, TimeoutException - Throws:
InterruptedExceptionTimeoutException
-
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.NotLoggedInExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionInterruptedException
-
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.NotConnectedExceptionInterruptedException
-
ensureNotSubscribed
public static void ensureNotSubscribed(Roster roster, org.jxmpp.jid.BareJid jid) throws org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException - Throws:
org.jivesoftware.smack.SmackException.NotConnectedExceptionInterruptedException
-
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.NotLoggedInExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionInterruptedExceptionTimeoutException
-
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.NotLoggedInExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionInterruptedExceptionTimeoutException
-
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.NotLoggedInExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionInterruptedExceptionTimeoutException
-