Class IoTProvisioningManager
java.lang.Object
org.jivesoftware.smack.Manager
org.jivesoftware.smackx.iot.provisioning.IoTProvisioningManager
public final class IoTProvisioningManager
extends org.jivesoftware.smack.Manager
A manager for XEP-0324: Internet of Things - Provisioning.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddBecameFriendListener(BecameFriendListener becameFriendListener) booleanaddWasUnfriendedListener(WasUnfriendedListener wasUnfriendedListener) org.jxmpp.jid.DomainBareJidTry to find a provisioning server component.org.jxmpp.jid.Jidstatic IoTProvisioningManagergetInstanceFor(org.jivesoftware.smack.XMPPConnection connection) Get the manger instance responsible for the given connection.booleaniAmFriendOf(org.jxmpp.jid.BareJid otherJid) booleanisFriend(org.jxmpp.jid.Jid provisioningServer, org.jxmpp.jid.BareJid friendInQuestion) As the given provisioning server is the given JID is a friend.booleanisMyFriend(org.jxmpp.jid.Jid friendInQuestion) booleanremoveBecameFriendListener(BecameFriendListener becameFriendListener) booleanremoveWasUnfriendedListener(WasUnfriendedListener wasUnfriendedListener) voidsendFriendshipRequest(org.jxmpp.jid.BareJid bareJid) voidsendFriendshipRequestIfRequired(org.jxmpp.jid.BareJid jid) voidsetConfiguredProvisioningServer(org.jxmpp.jid.Jid provisioningServer) Set the configured provisioning server.voidunfriend(org.jxmpp.jid.Jid friend) Methods inherited from class org.jivesoftware.smack.Manager
connection, getAuthenticatedConnectionOrThrow, schedule, schedule, scheduleBlocking
-
Method Details
-
getInstanceFor
public static IoTProvisioningManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection) Get the manger instance responsible for the given connection.- Parameters:
connection- the XMPP connection.- Returns:
- a manager instance.
-
setConfiguredProvisioningServer
public void setConfiguredProvisioningServer(org.jxmpp.jid.Jid provisioningServer) Set the configured provisioning server. Usenullas provisioningServer to use automatic discovery of the provisioning server (the default behavior).- Parameters:
provisioningServer- TODO javadoc me please
-
getConfiguredProvisioningServer
public org.jxmpp.jid.Jid getConfiguredProvisioningServer() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException- Throws:
org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionInterruptedException
-
findProvisioningServerComponent
public org.jxmpp.jid.DomainBareJid findProvisioningServerComponent() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedExceptionTry to find a provisioning server component.- Returns:
- the XMPP address of the provisioning server component if one was found.
- Throws:
org.jivesoftware.smack.SmackException.NoResponseException- if there was no response from the remote entity.org.jivesoftware.smack.XMPPException.XMPPErrorException- if there was an XMPP error returned.org.jivesoftware.smack.SmackException.NotConnectedException- if the XMPP connection is not connected.InterruptedException- if the calling thread was interrupted.- See Also:
-
isFriend
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, InterruptedException As the given provisioning server is the given JID is a friend.- Parameters:
provisioningServer- the provisioning server to ask.friendInQuestion- the JID to ask about.- Returns:
trueif the JID is a friend,falseotherwise.- Throws:
org.jivesoftware.smack.SmackException.NoResponseException- if there was no response from the remote entity.org.jivesoftware.smack.XMPPException.XMPPErrorException- if there was an XMPP error returned.org.jivesoftware.smack.SmackException.NotConnectedException- if the XMPP connection is not connected.InterruptedException- if the calling thread was interrupted.
-
iAmFriendOf
public boolean iAmFriendOf(org.jxmpp.jid.BareJid otherJid) -
sendFriendshipRequest
public void sendFriendshipRequest(org.jxmpp.jid.BareJid bareJid) throws org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException - Throws:
org.jivesoftware.smack.SmackException.NotConnectedExceptionInterruptedException
-
sendFriendshipRequestIfRequired
public void sendFriendshipRequestIfRequired(org.jxmpp.jid.BareJid jid) throws org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException - Throws:
org.jivesoftware.smack.SmackException.NotConnectedExceptionInterruptedException
-
isMyFriend
public boolean isMyFriend(org.jxmpp.jid.Jid friendInQuestion) -
unfriend
public void unfriend(org.jxmpp.jid.Jid friend) throws org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException - Throws:
org.jivesoftware.smack.SmackException.NotConnectedExceptionInterruptedException
-
addBecameFriendListener
-
removeBecameFriendListener
-
addWasUnfriendedListener
-
removeWasUnfriendedListener
-