public class RosterUtil extends Object
Constructor and Description |
---|
RosterUtil() |
Modifier and Type | Method and Description |
---|---|
static 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,
Date deadline) |
static void |
ensureSubscribedTo(XMPPConnection connectionOne,
XMPPConnection connectionTwo,
long timeout) |
static void |
preApproveSubscriptionIfRequiredAndPossible(Roster roster,
BareJid jid)
Pre-approve the subscription if it is required and possible.
|
static void |
waitUntilOtherEntityIsSubscribed(Roster roster,
BareJid otherEntity,
Date deadline) |
static void |
waitUntilOtherEntityIsSubscribed(Roster roster,
BareJid otherEntity,
long timeoutMillis) |
public RosterUtil()
public static void waitUntilOtherEntityIsSubscribed(Roster roster, BareJid otherEntity, long timeoutMillis) throws InterruptedException, TimeoutException
InterruptedException
TimeoutException
public static void waitUntilOtherEntityIsSubscribed(Roster roster, BareJid otherEntity, Date deadline) throws InterruptedException, TimeoutException
InterruptedException
TimeoutException
public static void preApproveSubscriptionIfRequiredAndPossible(Roster roster, BareJid jid) throws SmackException.NotLoggedInException, SmackException.NotConnectedException, InterruptedException
roster
- The roster which should be used for the pre-approval.jid
- The XMPP address which should be pre-approved.SmackException.NotLoggedInException
SmackException.NotConnectedException
InterruptedException
public static void askForSubscriptionIfRequired(Roster roster, BareJid jid) throws SmackException.NotLoggedInException, SmackException.NotConnectedException, InterruptedException
public static void ensureNotSubscribedToEachOther(XMPPConnection connectionOne, XMPPConnection connectionTwo) throws SmackException.NotConnectedException, InterruptedException
public static void ensureNotSubscribed(Roster roster, BareJid jid) throws SmackException.NotConnectedException, InterruptedException
public static void ensureSubscribed(XMPPConnection connectionOne, XMPPConnection connectionTwo, long timeout) throws SmackException.NotLoggedInException, SmackException.NotConnectedException, InterruptedException, TimeoutException
public static void ensureSubscribedTo(XMPPConnection connectionOne, XMPPConnection connectionTwo, long timeout) throws SmackException.NotLoggedInException, SmackException.NotConnectedException, InterruptedException, TimeoutException
public static void ensureSubscribedTo(XMPPConnection connectionOne, XMPPConnection connectionTwo, Date deadline) throws SmackException.NotLoggedInException, SmackException.NotConnectedException, InterruptedException, TimeoutException