public final class IoTDiscoveryManager extends Manager
Modifier and Type | Method and Description |
---|---|
IoTClaimed |
claimThing(Collection<Tag> metaTags) |
IoTClaimed |
claimThing(Collection<Tag> metaTags,
boolean publicThing) |
IoTClaimed |
claimThing(Jid registry,
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, getAuthenticatedConnectionOrThrow, schedule
public static IoTDiscoveryManager getInstanceFor(XMPPConnection connection)
connection
- the XMPP connection.public Jid findRegistry() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
null
otherwise.InterruptedException
SmackException.NotConnectedException
XMPPException.XMPPErrorException
SmackException.NoResponseException
public ThingState registerThing(Thing thing) throws SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException, XMPPException.XMPPErrorException, IoTClaimedException
public ThingState registerThing(Jid registry, Thing thing) throws SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException, XMPPException.XMPPErrorException, IoTClaimedException
public IoTClaimed claimThing(Collection<Tag> metaTags) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
public IoTClaimed claimThing(Collection<Tag> metaTags, boolean publicThing) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
public IoTClaimed claimThing(Jid registry, Collection<Tag> metaTags, boolean publicThing) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, 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.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public void removeThing(BareJid thing) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
public void removeThing(BareJid thing, NodeInfo nodeInfo) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
public void removeThing(Jid registry, BareJid thing, NodeInfo nodeInfo) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
public void unregister() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
public void unregister(NodeInfo nodeInfo) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
public void unregister(Jid registry, NodeInfo nodeInfo) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
public void disownThing(Jid thing) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
public void disownThing(Jid thing, NodeInfo nodeInfo) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
public void disownThing(Jid registry, Jid thing, NodeInfo nodeInfo) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
public boolean isRegistry(BareJid jid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
public boolean isRegistry(Jid jid)
public ThingState getStateFor(Thing thing)