Package org.jivesoftware.smack.roster
Class RosterUtil
- java.lang.Object
-
- org.jivesoftware.smack.roster.RosterUtil
-
public class RosterUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description RosterUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaskForSubscriptionIfRequired(Roster roster, BareJid jid)static voidensureNotSubscribed(Roster roster, BareJid jid)static voidensureNotSubscribedToEachOther(XMPPConnection connectionOne, XMPPConnection connectionTwo)static voidensureSubscribed(XMPPConnection connectionOne, XMPPConnection connectionTwo, long timeout)static voidensureSubscribedTo(XMPPConnection connectionOne, XMPPConnection connectionTwo, long timeout)static voidensureSubscribedTo(XMPPConnection connectionOne, XMPPConnection connectionTwo, Date deadline)static voidpreApproveSubscriptionIfRequiredAndPossible(Roster roster, BareJid jid)Pre-approve the subscription if it is required and possible.static voidwaitUntilOtherEntityIsSubscribed(Roster roster, BareJid otherEntity, long timeoutMillis)static voidwaitUntilOtherEntityIsSubscribed(Roster roster, BareJid otherEntity, Date deadline)
-
-
-
Constructor Detail
-
RosterUtil
public RosterUtil()
-
-
Method Detail
-
waitUntilOtherEntityIsSubscribed
public static void waitUntilOtherEntityIsSubscribed(Roster roster, BareJid otherEntity, long timeoutMillis) throws InterruptedException, TimeoutException
- Throws:
InterruptedExceptionTimeoutException
-
waitUntilOtherEntityIsSubscribed
public static void waitUntilOtherEntityIsSubscribed(Roster roster, BareJid otherEntity, Date deadline) throws InterruptedException, TimeoutException
- Throws:
InterruptedExceptionTimeoutException
-
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
-
-