public final class IoTProvisioningManager extends Manager
| Modifier and Type | Method and Description |
|---|---|
boolean |
addBecameFriendListener(BecameFriendListener becameFriendListener) |
boolean |
addWasUnfriendedListener(WasUnfriendedListener wasUnfriendedListener) |
org.jxmpp.jid.DomainBareJid |
findProvisioningServerComponent()
Try to find a provisioning server component.
|
org.jxmpp.jid.Jid |
getConfiguredProvisioningServer() |
static IoTProvisioningManager |
getInstanceFor(XMPPConnection connection)
Get the manger instance responsible for the given connection.
|
boolean |
iAmFriendOf(org.jxmpp.jid.BareJid otherJid) |
boolean |
isFriend(org.jxmpp.jid.Jid provisioningServer,
org.jxmpp.jid.BareJid friendInQuestion)
As the given provisioning server is the given JID is a friend.
|
boolean |
isMyFriend(org.jxmpp.jid.Jid friendInQuestion) |
boolean |
removeBecameFriendListener(BecameFriendListener becameFriendListener) |
boolean |
removeWasUnfriendedListener(WasUnfriendedListener wasUnfriendedListener) |
void |
sendFriendshipRequest(org.jxmpp.jid.BareJid bareJid) |
void |
sendFriendshipRequestIfRequired(org.jxmpp.jid.BareJid jid) |
void |
setConfiguredProvisioningServer(org.jxmpp.jid.Jid provisioningServer)
Set the configured provisioning server.
|
void |
unfriend(org.jxmpp.jid.Jid friend) |
connection, getAuthenticatedConnectionOrThrow, schedulepublic static IoTProvisioningManager getInstanceFor(XMPPConnection connection)
connection - the XMPP connection.public void setConfiguredProvisioningServer(org.jxmpp.jid.Jid provisioningServer)
null as provisioningServer to use
automatic discovery of the provisioning server (the default behavior).provisioningServer - public org.jxmpp.jid.Jid getConfiguredProvisioningServer() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic org.jxmpp.jid.DomainBareJid findProvisioningServerComponent() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic boolean isFriend(org.jxmpp.jid.Jid provisioningServer, org.jxmpp.jid.BareJid friendInQuestion) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
provisioningServer - the provisioning server to ask.friendInQuestion - the JID to ask about.true if the JID is a friend, false otherwise.SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic boolean iAmFriendOf(org.jxmpp.jid.BareJid otherJid)
public void sendFriendshipRequest(org.jxmpp.jid.BareJid bareJid) throws SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void sendFriendshipRequestIfRequired(org.jxmpp.jid.BareJid jid) throws SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic boolean isMyFriend(org.jxmpp.jid.Jid friendInQuestion)
public void unfriend(org.jxmpp.jid.Jid friend) throws SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic boolean addBecameFriendListener(BecameFriendListener becameFriendListener)
public boolean removeBecameFriendListener(BecameFriendListener becameFriendListener)
public boolean addWasUnfriendedListener(WasUnfriendedListener wasUnfriendedListener)
public boolean removeWasUnfriendedListener(WasUnfriendedListener wasUnfriendedListener)