Class IoTDiscoveryManager
java.lang.Object
org.jivesoftware.smack.Manager
org.jivesoftware.smackx.iot.discovery.IoTDiscoveryManager
public final class IoTDiscoveryManager
extends org.jivesoftware.smack.Manager
A manager for XEP-0347: Internet of Things - Discovery. Used to register and discover things.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionclaimThing(Collection<Tag> metaTags) claimThing(Collection<Tag> metaTags, boolean publicThing) claimThing(org.jxmpp.jid.Jid registry, Collection<Tag> metaTags, boolean publicThing) Claim a thing by providing a collection of meta tags.voiddisownThing(org.jxmpp.jid.Jid thing) voiddisownThing(org.jxmpp.jid.Jid thing, NodeInfo nodeInfo) voiddisownThing(org.jxmpp.jid.Jid registry, org.jxmpp.jid.Jid thing, NodeInfo nodeInfo) org.jxmpp.jid.JidTry to find an XMPP IoT registry.static IoTDiscoveryManagergetInstanceFor(org.jivesoftware.smack.XMPPConnection connection) Get the manger instance responsible for the given connection.getStateFor(Thing thing) booleanisRegistry(org.jxmpp.jid.BareJid jid) booleanisRegistry(org.jxmpp.jid.Jid jid) registerThing(Thing thing) registerThing(org.jxmpp.jid.Jid registry, Thing thing) voidremoveThing(org.jxmpp.jid.BareJid thing) voidremoveThing(org.jxmpp.jid.BareJid thing, NodeInfo nodeInfo) voidremoveThing(org.jxmpp.jid.Jid registry, org.jxmpp.jid.BareJid thing, NodeInfo nodeInfo) voidvoidunregister(NodeInfo nodeInfo) voidunregister(org.jxmpp.jid.Jid registry, NodeInfo nodeInfo) Methods inherited from class org.jivesoftware.smack.Manager
connection, getAuthenticatedConnectionOrThrow, schedule, schedule, scheduleBlocking
-
Method Details
-
getInstanceFor
Get the manger instance responsible for the given connection.- Parameters:
connection- the XMPP connection.- Returns:
- a manager instance.
-
findRegistry
public org.jxmpp.jid.Jid findRegistry() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedExceptionTry to find an XMPP IoT registry.- Returns:
- the JID of a Thing Registry if one could be found,
nullotherwise. - Throws:
InterruptedException- if the calling thread was interrupted.org.jivesoftware.smack.SmackException.NotConnectedException- if the XMPP connection is not connected.org.jivesoftware.smack.XMPPException.XMPPErrorException- if there was an XMPP error returned.org.jivesoftware.smack.SmackException.NoResponseException- if there was no response from the remote entity.- See Also:
-
registerThing
public ThingState registerThing(Thing thing) throws org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException, org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, IoTClaimedException - Throws:
org.jivesoftware.smack.SmackException.NotConnectedExceptionInterruptedExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionIoTClaimedException
-
registerThing
public ThingState registerThing(org.jxmpp.jid.Jid registry, Thing thing) throws org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException, org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, IoTClaimedException - Throws:
org.jivesoftware.smack.SmackException.NotConnectedExceptionInterruptedExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionIoTClaimedException
-
claimThing
public IoTClaimed claimThing(Collection<Tag> metaTags) 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
-
claimThing
public IoTClaimed claimThing(Collection<Tag> metaTags, boolean publicThing) 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
-
claimThing
public IoTClaimed claimThing(org.jxmpp.jid.Jid registry, Collection<Tag> metaTags, boolean publicThing) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException Claim a thing by providing a collection of meta tags. If the claim was successful, then aIoTClaimedinstance will be returned, which contains the XMPP address of the thing. UseIoTClaimed.getJid()to retrieve this address.- Parameters:
registry- the registry use to claim the thing.metaTags- a collection of meta tags used to identify the thing.publicThing- if this is a public thing.- Returns:
- a
IoTClaimedif successful. - 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.
-
removeThing
public void removeThing(org.jxmpp.jid.BareJid thing) 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
-
removeThing
public void removeThing(org.jxmpp.jid.BareJid thing, NodeInfo nodeInfo) 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
-
removeThing
public void removeThing(org.jxmpp.jid.Jid registry, org.jxmpp.jid.BareJid thing, NodeInfo nodeInfo) 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
-
unregister
public void unregister() 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
-
unregister
public void unregister(NodeInfo nodeInfo) 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
-
unregister
public void unregister(org.jxmpp.jid.Jid registry, NodeInfo nodeInfo) 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
-
disownThing
public void disownThing(org.jxmpp.jid.Jid thing) 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
-
disownThing
public void disownThing(org.jxmpp.jid.Jid thing, NodeInfo nodeInfo) 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
-
disownThing
public void disownThing(org.jxmpp.jid.Jid registry, org.jxmpp.jid.Jid thing, NodeInfo nodeInfo) 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
-
isRegistry
public boolean isRegistry(org.jxmpp.jid.BareJid jid) 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
-
isRegistry
public boolean isRegistry(org.jxmpp.jid.Jid jid) -
getStateFor
-