Class RemoteThingWithTunnels

All Implemented Interfaces:
ISupportsAccessModifier, IConfigurableObject, INotScriptFriendly, IEndpointBindingObserver, ISupportsDeprecation, IDiffableObject, IAlertProvider, IAvatar, IEntityLifeCycleEvent, IEventMetadataProvider, IEventProvider, IPersistable, IPropertyProvider, IServiceMetadataProvider, IServiceProvider, IShapeProvider, ITaggableObject, IDependencyScannableObject, IImportDependencyHandler, IHierarchicalEntity, IEntityDefinition, IPersistableObject<String>, IDesignTimeSecurable, IDesignTimeSecurableEntity, IRunTimeSecurable, IRunTimeSecurableEntity, ISecurable, IVisibilitySecurable, IVisibilitySecurableEntity, IEventProcessor, IConnectedDevice, IAspectContainer, INamedObject, Serializable
Direct Known Subclasses:
RemoteThingWithTunnelsAndFileTransfer

@ThingworxExtensionApiClass(since={7,4}) public class RemoteThingWithTunnels extends RemoteThing
See Also:
  • Constructor Details

  • Method Details

    • initializeThing

      @ThingworxExtensionApiMethod(since={9,0}, canOverride=true, requiresSuper=true) public void initializeThing(ContextType contextType) throws Exception
      Description copied from class: Thing


      An initialization hook for subclasses of Thing. Some resources of Thing may not be available at this point in the lifecycle.

      Overrides:
      initializeThing in class RemoteThing
      Throws:
      Exception - If an error occurs
    • IsDerivedFromTemplate

      @ThingworxExtensionApiMethod(since={7,4}) public Boolean IsDerivedFromTemplate(String thingTemplateName) throws Exception
      Service Category:
      Metadata
      Service Description:
      Check to see if a thing is derived from a particular thing template.
      Overrides:
      IsDerivedFromTemplate in class Thing
      Parameters:
      thingTemplateName - Thing template name - THINGTEMPLATENAME
      Returns:
      result Is Derived From Template - BOOLEAN
      Throws:
      Exception - If an error occurs
    • GetTunnelNames

      @ThingworxExtensionApiMethod(since={7,4}) public InfoTable GetTunnelNames() throws Exception
      Service Category:
      Tunneling
      Service Description:
      Get a list of Tunnels registered at the edge.
      Returns:
      result Tunnel names - INFOTABLE - Aspects {dataShape:EntityList}
      Throws:
      Exception - If an error occurs
    • GetTunnelStatus

      @ThingworxExtensionApiMethod(since={7,4}) public InfoTable GetTunnelStatus() throws Exception
      Service Category:
      Tunneling
      Service Description:
      Get the tunnel status and access URL.
      Returns:
      result Tunnel status - INFOTABLE - Aspects {dataShape:TunnelStatus}
      Throws:
      Exception - If an error occurs
    • GetTunnels

      @ThingworxExtensionApiMethod(since={7,4}) public InfoTable GetTunnels() throws Exception
      Service Category:
      Tunneling
      Service Description:
      Get a list of Tunnel Endpoints registered at the edge.
      Returns:
      result List of registered tunnel endpoints - INFOTABLE - Aspects {dataShape:TunnelEndpoint}
      Throws:
      Exception - If an error occurs
    • AddTunnel

      @ThingworxExtensionApiMethod(since={7,4}) public void AddTunnel(String name, String host, Double port, String proto, Double numConnects, String description, String appUri) throws Exception
      Service Category:
      Tunneling
      Service Description:
      Register a new tunnel endpoint at the edge.
      Parameters:
      name - Name of the tunnel to add - STRING
      host - Host that the tunnel will connect to - STRING
      port - Port that the tunnel will connect to - NUMBER
      proto - Protocol used by the tunnel - STRING
      numConnects - The number of connections required to initilaize the tunnel - NUMBER
      description - Description of the tunnel - STRING
      appUri - Location of the client app that will use this tunnel - STRING
      Throws:
      Exception - If an error occurs
    • RemoveTunnel

      @ThingworxExtensionApiMethod(since={7,4}) public void RemoveTunnel(String name) throws Exception
      Service Category:
      Tunneling
      Service Description:
      Remove a tunnel endpoint from the edge.
      Parameters:
      name - Name of the tunnel to remove - STRING
      Throws:
      Exception - If an error occurs
    • GetTunnel

      @ThingworxExtensionApiMethod(since={7,4}) public InfoTable GetTunnel(String name) throws Exception
      Service Category:
      Tunneling
      Service Description:
      Get information about a specific tunnel endpoint registered at the edge.
      Parameters:
      name - Name of the tunnel to query - STRING
      Returns:
      result A tunnel endpoint - INFOTABLE - Aspects {dataShape:TunnelEndpoint}
      Throws:
      Exception - If an error occurs
    • StartTunnel

      @ThingworxExtensionApiMethod(since={7,4}) public void StartTunnel(String tid, String type, Integer chunksize, Integer idle_timeout, Integer read_timeout, Integer startup_timeout, org.json.JSONObject connection) throws Exception
      Parameters:
      tid - Id of the tunnel - STRING
      type - Type of tunnel, tcp or udp - STRING
      chunksize - Max size of tunnel data to send - INTEGER
      idle_timeout - How long tunnel can remain idle before it will be closed - INTEGER
      read_timeout - Read timout on tunnel socket - INTEGER
      startup_timeout - Read timout on tunnel socket - INTEGER
      connection - The connection parameters - JSON
      Throws:
      Exception - If an error occurs
    • CompleteTunnel

      @ThingworxExtensionApiMethod(since={7,4}) public void CompleteTunnel(String tid, org.joda.time.DateTime start_time, org.joda.time.DateTime stop_time, String peer_name, org.json.JSONObject connection) throws Exception
      Parameters:
      tid - Id of the tunnel - STRING
      start_time - Start time of the tunnel - DATETIME
      stop_time - Stop time of the tunnel - DATETIME
      peer_name - Name of the peer connected to this tunnel - STRING
      connection - The connection parameters - JSON
      Throws:
      Exception - If an error occurs
    • TunnelCommandToEdge

      @ThingworxExtensionApiMethod(since={7,4}) public void TunnelCommandToEdge(String tid, String command) throws Exception
      Parameters:
      tid - Id of the tunnel - STRING
      command - The command - STRING
      Throws:
      Exception - If an error occurs
    • TunnelCommandFromEdge

      @ThingworxExtensionApiMethod(since={7,4}) public void TunnelCommandFromEdge(String tid, String command) throws Exception
      Parameters:
      tid - Id of the tunnel - STRING
      command - The command - STRING
      Throws:
      Exception - If an error occurs