public final class IoTDiscoveryManager extends Manager
| Modifier and Type | Method and Description |
|---|---|
IoTClaimed |
claimThing(java.util.Collection<Tag> metaTags) |
IoTClaimed |
claimThing(java.util.Collection<Tag> metaTags,
boolean publicThing) |
IoTClaimed |
claimThing(org.jxmpp.jid.Jid registry,
java.util.Collection<Tag> metaTags,
boolean publicThing)
Claim a thing by providing a collection of meta tags.
|
void |
disownThing(org.jxmpp.jid.Jid thing) |
void |
disownThing(org.jxmpp.jid.Jid registry,
org.jxmpp.jid.Jid thing,
NodeInfo nodeInfo) |
void |
disownThing(org.jxmpp.jid.Jid thing,
NodeInfo nodeInfo) |
org.jxmpp.jid.Jid |
findRegistry()
Try to find an XMPP IoT registry.
|
static IoTDiscoveryManager |
getInstanceFor(XMPPConnection connection)
Get the manger instance responsible for the given connection.
|
ThingState |
getStateFor(Thing thing) |
boolean |
isRegistry(org.jxmpp.jid.BareJid jid) |
boolean |
isRegistry(org.jxmpp.jid.Jid jid) |
ThingState |
registerThing(org.jxmpp.jid.Jid registry,
Thing thing) |
ThingState |
registerThing(Thing thing) |
void |
removeThing(org.jxmpp.jid.BareJid thing) |
void |
removeThing(org.jxmpp.jid.BareJid thing,
NodeInfo nodeInfo) |
void |
removeThing(org.jxmpp.jid.Jid registry,
org.jxmpp.jid.BareJid thing,
NodeInfo nodeInfo) |
void |
unregister() |
void |
unregister(org.jxmpp.jid.Jid registry,
NodeInfo nodeInfo) |
void |
unregister(NodeInfo nodeInfo) |
connection, getAuthenticatedConnectionOrThrow, schedulepublic static IoTDiscoveryManager getInstanceFor(XMPPConnection connection)
connection - the XMPP connection.public org.jxmpp.jid.Jid findRegistry() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
null otherwise.java.lang.InterruptedExceptionSmackException.NotConnectedExceptionXMPPException.XMPPErrorExceptionSmackException.NoResponseExceptionpublic ThingState registerThing(Thing thing) throws SmackException.NotConnectedException, java.lang.InterruptedException, SmackException.NoResponseException, XMPPException.XMPPErrorException, IoTClaimedException
SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionSmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionIoTClaimedExceptionpublic ThingState registerThing(org.jxmpp.jid.Jid registry, Thing thing) throws SmackException.NotConnectedException, java.lang.InterruptedException, SmackException.NoResponseException, XMPPException.XMPPErrorException, IoTClaimedException
SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionSmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionIoTClaimedExceptionpublic IoTClaimed claimThing(java.util.Collection<Tag> metaTags) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic IoTClaimed claimThing(java.util.Collection<Tag> metaTags, boolean publicThing) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic IoTClaimed claimThing(org.jxmpp.jid.Jid registry, java.util.Collection<Tag> metaTags, boolean publicThing) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
IoTClaimed
instance will be returned, which contains the XMPP address of the thing. Use IoTClaimed.getJid() to
retrieve this address.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.IoTClaimed if successful.SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void removeThing(org.jxmpp.jid.BareJid thing) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void removeThing(org.jxmpp.jid.BareJid thing, NodeInfo nodeInfo) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void removeThing(org.jxmpp.jid.Jid registry, org.jxmpp.jid.BareJid thing, NodeInfo nodeInfo) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void unregister() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void unregister(NodeInfo nodeInfo) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void unregister(org.jxmpp.jid.Jid registry, NodeInfo nodeInfo) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void disownThing(org.jxmpp.jid.Jid thing) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void disownThing(org.jxmpp.jid.Jid thing, NodeInfo nodeInfo) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void disownThing(org.jxmpp.jid.Jid registry, org.jxmpp.jid.Jid thing, NodeInfo nodeInfo) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic boolean isRegistry(org.jxmpp.jid.BareJid jid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic boolean isRegistry(org.jxmpp.jid.Jid jid)
public ThingState getStateFor(Thing thing)