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(Jid registry,
java.util.Collection<Tag> metaTags,
boolean publicThing)
Claim a thing by providing a collection of meta tags.
|
void |
disownThing(Jid thing) |
void |
disownThing(Jid registry,
Jid thing,
NodeInfo nodeInfo) |
void |
disownThing(Jid thing,
NodeInfo nodeInfo) |
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(BareJid jid) |
boolean |
isRegistry(Jid jid) |
ThingState |
registerThing(Jid registry,
Thing thing) |
ThingState |
registerThing(Thing thing) |
void |
removeThing(BareJid thing) |
void |
removeThing(BareJid thing,
NodeInfo nodeInfo) |
void |
removeThing(Jid registry,
BareJid thing,
NodeInfo nodeInfo) |
void |
unregister() |
void |
unregister(Jid registry,
NodeInfo nodeInfo) |
void |
unregister(NodeInfo nodeInfo) |
connection, getAuthenticatedConnectionOrThrowpublic static IoTDiscoveryManager getInstanceFor(XMPPConnection connection)
connection - the XMPP connection.public 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(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(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(BareJid thing) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void removeThing(BareJid thing, NodeInfo nodeInfo) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void removeThing(Jid registry, 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(Jid registry, NodeInfo nodeInfo) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void disownThing(Jid thing) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void disownThing(Jid thing, NodeInfo nodeInfo) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void disownThing(Jid registry, Jid thing, NodeInfo nodeInfo) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic boolean isRegistry(BareJid jid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic boolean isRegistry(Jid jid)
public ThingState getStateFor(Thing thing)