Class RemoteThing

    • Field Detail

      • STORE_AND_FORWARD_IS_NOT_ENABLED

        public static final java.lang.String STORE_AND_FORWARD_IS_NOT_ENABLED
        See Also:
        Constant Field Values
    • Constructor Detail

      • RemoteThing

        public RemoteThing()
    • Method Detail

      • initializeThing

        @ThingworxExtensionApiMethod(since={9,0},
                                     canOverride=true)
        protected void initializeThing​(ContextType contextType)
                                throws java.lang.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 Thing
        Throws:
        java.lang.Exception - If an error occurs
      • SetPropertyValues

        @ThingworxExtensionApiMethod(since={6,6})
        public void SetPropertyValues​(InfoTable values)
                               throws java.lang.Exception
        Service Category:
        Properties
        Service Description:
        Set a subset of the current property values for this thing.


        Set multiple property values for this thing. If this RemoteThing is not currently connected, property values may be queued and a CouldNotConnectException thrown. If the thing does not have any remaining egress quota, a EdgeControlledEgressQuotaException will be thrown.
        Overrides:
        SetPropertyValues in class Thing
        Parameters:
        values - Property values - INFOTABLE
        Throws:
        java.lang.Exception - If any of the property values caused an error
      • executeRemoteService

        @ThingworxExtensionApiMethod(since={7,4})
        public InfoTable executeRemoteService​(ServiceDefinition def,
                                              ValueCollection params,
                                              boolean isPrivate)
                                       throws java.lang.Exception


        Execute the RemoteService.
        Parameters:
        def - The ServiceDefinition of the RemoteService to be called.
        params - The parameters for the RemoteService to be called.
        isPrivate - (ignored)
        Returns:
        The execution result of the RemoteService call.
        Throws:
        CouldNotConnectException - If the Thing is not connected, but the service invocation can be queued.
        EdgeControlledEgressQuotaException - If the EdgeControlled Thing lacks egress quota to send the service invocation. Queueable service invocations will be queued if possible.
        MessageStoreFullException - If the MessageStore for this Thing is full and cannot accept the service.
        java.lang.Exception - is thrown if the service invocation was unable to be called for another reason.
      • GetRemoteMetadata

        @ThingworxExtensionApiMethod(since={7,4})
        public org.json.JSONObject GetRemoteMetadata()
                                              throws java.lang.Exception
        Service Category:
        Metadata
        Service Description:
        Return the metadata for the connected thing.
        Returns:
        result Connected Thing metadata - JSON
        Throws:
        java.lang.Exception - If an error occurs
      • UpdateSubscribedPropertyValuesBatched

        @ThingworxExtensionApiMethod(since={9,5})
        public void UpdateSubscribedPropertyValuesBatched​(InfoTable batches)
                                                   throws java.lang.Exception
        Service Category:
        Properties
        Service Description:
        Write subscribed property values for a connected thing, processing change events according to the provided batches.
        Parameters:
        batches - Collection of batches containing properties to be updated - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • UpdateSubscribedPropertyValues

        @ThingworxExtensionApiMethod(since={7,4})
        public void UpdateSubscribedPropertyValues​(InfoTable values)
                                            throws java.lang.Exception
        Service Category:
        Updates
        Service Description:
        Write subscribed property values for a connected thing.
        Parameters:
        values - Collection of properties to be updated - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • ProcessRemoteEvents

        @ThingworxExtensionApiMethod(since={7,4})
        public void ProcessRemoteEvents​(InfoTable values)
                                 throws java.lang.Exception
        Service Category:
        Updates
        Service Description:
        Process remote events.
        Parameters:
        values - Collection of events to be dispatched - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • GetPropertySubscriptions

        @ThingworxExtensionApiMethod(since={8,0})
        public InfoTable GetPropertySubscriptions​(org.json.JSONObject options)
                                           throws java.lang.Exception
        Service Category:
        Metadata
        Service Description:
        Get the properties plus data change type and data change threshold for the edge Thing.
        Parameters:
        options - Binding options supported by the calling SDK - JSON
        Returns:
        result The subscribed properties for the Remote Thing - INFOTABLE - Aspects {dataShape:EdgeThingPropertyNotification}
        Throws:
        java.lang.Exception - If an error occurs
      • GetEventSubscriptions

        @ThingworxExtensionApiMethod(since={7,4})
        public InfoTable GetEventSubscriptions()
                                        throws java.lang.Exception
        Service Category:
        Metadata
        Service Description:
        Get the events that are bound to the remote Thing.
        Returns:
        result The subscribed events for the Remote Thing - INFOTABLE - Aspects {dataShape:EdgeThingEventNotification}
        Throws:
        java.lang.Exception - If an error occurs
      • SendQueuedTasks

        @ThingworxExtensionApiMethod(since={7,4})
        public void SendQueuedTasks()
                             throws java.lang.Exception
        Service Category:
        Queueing
        Service Description:
        Sends any queued tasks to the connected thing.
        Throws:
        java.lang.Exception - If an error occurs
      • SendMaxQueuedTasks

        @ThingworxExtensionApiMethod(since={7,4})
        public java.lang.Integer SendMaxQueuedTasks​(java.lang.Integer maxCount)
                                             throws java.lang.Exception
        Service Category:
        Queueing
        Service Description:
        Sends up to a specific maximum number of queued tasks to the connected thing.
        Parameters:
        maxCount - The maximum number of messages desired by the edge device. - INTEGER
        Returns:
        result The number of queued tasks sent, up to maxCount. - INTEGER
        Throws:
        java.lang.Exception - If an error occurs
      • GetQueuedTasks

        @ThingworxExtensionApiMethod(since={7,4})
        public InfoTable GetQueuedTasks()
                                 throws java.lang.Exception
        Service Category:
        Queueing
        Service Description:
        Retrieve any tasks for this connected thing.
        Returns:
        result Edge things - INFOTABLE - Aspects {dataShape:MessageStoreList}
        Throws:
        java.lang.Exception - If an error occurs
      • AddDynamicRemoteSubscription

        @ThingworxExtensionApiMethod(since={7,4})
        public void AddDynamicRemoteSubscription​(java.lang.String thingName,
                                                 java.lang.String eventName,
                                                 java.lang.String propertyName,
                                                 java.lang.String serviceName)
                                          throws java.lang.Exception
        Parameters:
        thingName - Thing name - THINGNAME
        eventName - Event name - STRING
        propertyName - Property name - STRING
        serviceName - Remote service name - STRING
        Throws:
        java.lang.Exception - If an error occurs
      • RemoveDynamicRemoteSubscription

        @ThingworxExtensionApiMethod(since={7,4})
        public void RemoveDynamicRemoteSubscription​(java.lang.String thingName,
                                                    java.lang.String eventName,
                                                    java.lang.String propertyName)
                                             throws java.lang.Exception
        Parameters:
        thingName - Thing name - THINGNAME
        eventName - Event name - STRING
        propertyName - Property name - STRING
        Throws:
        java.lang.Exception - If an error occurs