Class IoTDiscoveryManager
- java.lang.Object
-
- org.jivesoftware.smack.Manager
-
- org.jivesoftware.smackx.iot.discovery.IoTDiscoveryManager
-
public final class IoTDiscoveryManager extends org.jivesoftware.smack.ManagerA manager for XEP-0347: Internet of Things - Discovery. Used to register and discover things.- See Also:
- XEP-0347: Internet of Things - Discovery
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IoTClaimedclaimThing(java.util.Collection<Tag> metaTags)IoTClaimedclaimThing(java.util.Collection<Tag> metaTags, boolean publicThing)IoTClaimedclaimThing(org.jxmpp.jid.Jid registry, java.util.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.JidfindRegistry()Try to find an XMPP IoT registry.static IoTDiscoveryManagergetInstanceFor(org.jivesoftware.smack.XMPPConnection connection)Get the manger instance responsible for the given connection.ThingStategetStateFor(Thing thing)booleanisRegistry(org.jxmpp.jid.BareJid jid)booleanisRegistry(org.jxmpp.jid.Jid jid)ThingStateregisterThing(Thing thing)ThingStateregisterThing(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)voidunregister()voidunregister(NodeInfo nodeInfo)voidunregister(org.jxmpp.jid.Jid registry, NodeInfo nodeInfo)
-
-
-
Method Detail
-
getInstanceFor
public static IoTDiscoveryManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
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, java.lang.InterruptedExceptionTry to find an XMPP IoT registry.- Returns:
- the JID of a Thing Registry if one could be found,
nullotherwise. - Throws:
java.lang.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:
- XEP-0347 ยง 3.5 Finding Thing Registry
-
registerThing
public ThingState registerThing(Thing thing) throws org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, IoTClaimedException
- Throws:
org.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.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, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, IoTClaimedException
- Throws:
org.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionIoTClaimedException
-
claimThing
public IoTClaimed claimThing(java.util.Collection<Tag> metaTags) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
- Throws:
org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedException
-
claimThing
public IoTClaimed claimThing(java.util.Collection<Tag> metaTags, boolean publicThing) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
- Throws:
org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedException
-
claimThing
public IoTClaimed claimThing(org.jxmpp.jid.Jid registry, java.util.Collection<Tag> metaTags, boolean publicThing) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.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.java.lang.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, java.lang.InterruptedException- Throws:
org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedException
-
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, java.lang.InterruptedException- Throws:
org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedException
-
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, java.lang.InterruptedException- Throws:
org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedException
-
unregister
public void unregister() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException- Throws:
org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedException
-
unregister
public void unregister(NodeInfo nodeInfo) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
- Throws:
org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedException
-
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, java.lang.InterruptedException- Throws:
org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedException
-
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, java.lang.InterruptedException- Throws:
org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedException
-
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, java.lang.InterruptedException- Throws:
org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedException
-
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, java.lang.InterruptedException- Throws:
org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedException
-
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, java.lang.InterruptedException- Throws:
org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedException
-
isRegistry
public boolean isRegistry(org.jxmpp.jid.Jid jid)
-
getStateFor
public ThingState getStateFor(Thing thing)
-
-