Package org.jivesoftware.smack.roster
Class RosterUtil
java.lang.Object
org.jivesoftware.smack.roster.RosterUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
askForSubscriptionIfRequired
(Roster roster, BareJid jid) static void
ensureNotSubscribed
(Roster roster, BareJid jid) static void
ensureNotSubscribedToEachOther
(XMPPConnection connectionOne, XMPPConnection connectionTwo) static void
ensureSubscribed
(XMPPConnection connectionOne, XMPPConnection connectionTwo, long timeout) static void
ensureSubscribedTo
(XMPPConnection connectionOne, XMPPConnection connectionTwo, long timeout) static void
ensureSubscribedTo
(XMPPConnection connectionOne, XMPPConnection connectionTwo, Date deadline) static void
preApproveSubscriptionIfRequiredAndPossible
(Roster roster, BareJid jid) Pre-approve the subscription if it is required and possible.static void
waitUntilOtherEntityIsSubscribed
(Roster roster, BareJid otherEntity, long timeoutMillis) static void
waitUntilOtherEntityIsSubscribed
(Roster roster, BareJid otherEntity, Date deadline)
-
Constructor Details
-
RosterUtil
public RosterUtil()
-
-
Method Details
-
waitUntilOtherEntityIsSubscribed
public static void waitUntilOtherEntityIsSubscribed(Roster roster, BareJid otherEntity, long timeoutMillis) throws InterruptedException, TimeoutException - Throws:
InterruptedException
TimeoutException
-
waitUntilOtherEntityIsSubscribed
public static void waitUntilOtherEntityIsSubscribed(Roster roster, BareJid otherEntity, Date deadline) throws InterruptedException, TimeoutException - Throws:
InterruptedException
TimeoutException
-
preApproveSubscriptionIfRequiredAndPossible
public static void preApproveSubscriptionIfRequiredAndPossible(Roster roster, BareJid jid) throws SmackException.NotLoggedInException, 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:
SmackException.NotLoggedInException
- if the XMPP connection is not authenticated.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, BareJid jid) throws SmackException.NotLoggedInException, SmackException.NotConnectedException, InterruptedException -
ensureNotSubscribedToEachOther
public static void ensureNotSubscribedToEachOther(XMPPConnection connectionOne, XMPPConnection connectionTwo) throws SmackException.NotConnectedException, InterruptedException -
ensureNotSubscribed
public static void ensureNotSubscribed(Roster roster, BareJid jid) throws SmackException.NotConnectedException, InterruptedException -
ensureSubscribed
public static void ensureSubscribed(XMPPConnection connectionOne, XMPPConnection connectionTwo, long timeout) throws SmackException.NotLoggedInException, SmackException.NotConnectedException, InterruptedException, TimeoutException -
ensureSubscribedTo
public static void ensureSubscribedTo(XMPPConnection connectionOne, XMPPConnection connectionTwo, long timeout) throws SmackException.NotLoggedInException, SmackException.NotConnectedException, InterruptedException, TimeoutException -
ensureSubscribedTo
public static void ensureSubscribedTo(XMPPConnection connectionOne, XMPPConnection connectionTwo, Date deadline) throws SmackException.NotLoggedInException, SmackException.NotConnectedException, InterruptedException, TimeoutException
-