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 Details

    • 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, InterruptedException
      Try to find an XMPP IoT registry.
      Returns:
      the JID of a Thing Registry if one could be found, null otherwise.
      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.NotConnectedException
      InterruptedException
      org.jivesoftware.smack.SmackException.NoResponseException
      org.jivesoftware.smack.XMPPException.XMPPErrorException
      IoTClaimedException
    • 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.NotConnectedException
      InterruptedException
      org.jivesoftware.smack.SmackException.NoResponseException
      org.jivesoftware.smack.XMPPException.XMPPErrorException
      IoTClaimedException
    • 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.NoResponseException
      org.jivesoftware.smack.XMPPException.XMPPErrorException
      org.jivesoftware.smack.SmackException.NotConnectedException
      InterruptedException
    • 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.NoResponseException
      org.jivesoftware.smack.XMPPException.XMPPErrorException
      org.jivesoftware.smack.SmackException.NotConnectedException
      InterruptedException
    • 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 a IoTClaimed instance will be returned, which contains the XMPP address of the thing. Use IoTClaimed.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 IoTClaimed if 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.NoResponseException
      org.jivesoftware.smack.XMPPException.XMPPErrorException
      org.jivesoftware.smack.SmackException.NotConnectedException
      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, InterruptedException
      Throws:
      org.jivesoftware.smack.SmackException.NoResponseException
      org.jivesoftware.smack.XMPPException.XMPPErrorException
      org.jivesoftware.smack.SmackException.NotConnectedException
      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, InterruptedException
      Throws:
      org.jivesoftware.smack.SmackException.NoResponseException
      org.jivesoftware.smack.XMPPException.XMPPErrorException
      org.jivesoftware.smack.SmackException.NotConnectedException
      InterruptedException
    • 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.NoResponseException
      org.jivesoftware.smack.XMPPException.XMPPErrorException
      org.jivesoftware.smack.SmackException.NotConnectedException
      InterruptedException
    • 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.NoResponseException
      org.jivesoftware.smack.XMPPException.XMPPErrorException
      org.jivesoftware.smack.SmackException.NotConnectedException
      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, InterruptedException
      Throws:
      org.jivesoftware.smack.SmackException.NoResponseException
      org.jivesoftware.smack.XMPPException.XMPPErrorException
      org.jivesoftware.smack.SmackException.NotConnectedException
      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, InterruptedException
      Throws:
      org.jivesoftware.smack.SmackException.NoResponseException
      org.jivesoftware.smack.XMPPException.XMPPErrorException
      org.jivesoftware.smack.SmackException.NotConnectedException
      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, InterruptedException
      Throws:
      org.jivesoftware.smack.SmackException.NoResponseException
      org.jivesoftware.smack.XMPPException.XMPPErrorException
      org.jivesoftware.smack.SmackException.NotConnectedException
      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, InterruptedException
      Throws:
      org.jivesoftware.smack.SmackException.NoResponseException
      org.jivesoftware.smack.XMPPException.XMPPErrorException
      org.jivesoftware.smack.SmackException.NotConnectedException
      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, InterruptedException
      Throws:
      org.jivesoftware.smack.SmackException.NoResponseException
      org.jivesoftware.smack.XMPPException.XMPPErrorException
      org.jivesoftware.smack.SmackException.NotConnectedException
      InterruptedException
    • isRegistry

      public boolean isRegistry(org.jxmpp.jid.Jid jid)
    • getStateFor

      public ThingState getStateFor(Thing thing)