public final class IoTProvisioningManager
extends org.jivesoftware.smack.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(org.jivesoftware.smack.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) |
public static IoTProvisioningManager getInstanceFor(org.jivesoftware.smack.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 org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
public org.jxmpp.jid.DomainBareJid findProvisioningServerComponent() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
public boolean isFriend(org.jxmpp.jid.Jid provisioningServer, org.jxmpp.jid.BareJid friendInQuestion) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.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.org.jivesoftware.smack.SmackException.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
public boolean iAmFriendOf(org.jxmpp.jid.BareJid otherJid)
public void sendFriendshipRequest(org.jxmpp.jid.BareJid bareJid) throws org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
public void sendFriendshipRequestIfRequired(org.jxmpp.jid.BareJid jid) throws org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
public boolean isMyFriend(org.jxmpp.jid.Jid friendInQuestion)
public void unfriend(org.jxmpp.jid.Jid friend) throws org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
public boolean addBecameFriendListener(BecameFriendListener becameFriendListener)
public boolean removeBecameFriendListener(BecameFriendListener becameFriendListener)
public boolean addWasUnfriendedListener(WasUnfriendedListener wasUnfriendedListener)
public boolean removeWasUnfriendedListener(WasUnfriendedListener wasUnfriendedListener)