Package com.thingworx.things.connected
Class RemoteThing
java.lang.Object
com.thingworx.types.NamedObject
com.thingworx.persistence.common.PersistableNamedObject
com.thingworx.entities.RootEntity
com.thingworx.things.Thing
com.thingworx.things.connected.RemoteThing
- 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:
RemoteThingWithFileTransfer
,RemoteThingWithTunnels
@ThingworxExtensionApiClass(since={7,4},
canExtendOrImplement=true,
canInstantiate=true)
public class RemoteThing
extends Thing
implements IEndpointBindingObserver, IConnectedDevice
- See Also:
-
Field Summary
Fields inherited from class com.thingworx.things.Thing
_logger, BUILT_IN_PROPERTY_DEFINITIONS, DATASHAPE_INCOMING_LOCAL_PROPERTY_BINDING, DEFAULT_SETTINGS_TABLE, ENTITYLIST_SHAPE, GENERIC_THING_TEMPLATE, NON_PROPERTY_BASED_EVENTS, PROPERTY_EVENTS, TYPE_THING
Fields inherited from class com.thingworx.entities.RootEntity
BASIC_PROPERTY_DEFINITIONS, EXCLUDED_ENTITY_TYPES_IN_PROJECT
Fields inherited from class com.thingworx.types.NamedObject
NAME_COMPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
AddDynamicRemoteSubscription
(String thingName, String eventName, String propertyName, String serviceName) callService
(String serviceName, ValueCollection params, BaseTypes resultType) void
executeRemoteService
(ServiceDefinition def, ValueCollection params, boolean isPrivate)
Execute the RemoteService.Service Category: Metadata Service Description: Get the events that are bound to the remote Thing.org.joda.time.DateTime
GetPropertySubscriptions
(org.json.JSONObject options) Service Category: Metadata Service Description: Get the properties plus data change type and data change threshold for the edge Thing.Service Category: Queueing Service Description: Retrieve any tasks for this connected thing.org.json.JSONObject
Service Category: Metadata Service Description: Return the metadata for the connected thing.protected void
initializeThing
(ContextType contextType) boolean
void
ProcessRemoteEvents
(InfoTable values) Service Category: Updates Service Description: Process remote events.protected InfoTable
processRemoteService
(IServiceProvider serviceProvider, ServiceDefinition serviceDefinition, ValueCollection params) void
RemoveDynamicRemoteSubscription
(String thingName, String eventName, String propertyName) SendMaxQueuedTasks
(Integer maxCount) Service Category: Queueing Service Description: Sends up to a specific maximum number of queued tasks to the connected thing.void
Service Category: Queueing Service Description: Sends any queued tasks to the connected thing.void
SetPropertyValues
(InfoTable values) Service Category: Properties Service Description: Set a subset of the current property values for this thing.
Set multiple property values for this thing.protected final void
startThing
(ContextType contextType) protected final void
stopThing
(ContextType contextType) void
Service Category: Updates Service Description: Write subscribed property values for a connected thing.void
Service Category: Properties Service Description: Write subscribed property values for a connected thing, processing change events according to the provided batches.Methods inherited from class com.thingworx.things.Thing
AcknowledgeAlert, acknowledgeAlertByProperty, acknowledgeAlertByPropertyAndName, acknowledgeAllAlerts, AcknowledgeAllAlerts, AddBooleanValueStreamEntry, AddBooleanValueStreamEntry, AddDateTimeValueStreamEntry, AddDateTimeValueStreamEntry, AddDynamicSubscription, AddEventDefinition, AddImageValueStreamEntry, AddImageValueStreamEntry, AddInfoTableValueStreamEntry, AddInfoTableValueStreamEntry, AddIntegerValueStreamEntry, AddIntegerValueStreamEntry, AddLocationValueStreamEntry, AddLocationValueStreamEntry, AddLongValueStreamEntry, AddLongValueStreamEntry, AddNumberValueStreamEntry, AddNumberValueStreamEntry, AddOrUpdateAlert, addProperty, AddPropertyDefinition, AddPropertyDefinition, AddPropertyDefinition, AddPropertyDefinition, AddPropertyDefinitions, AddPropertyTransformDefinition, AddServiceDefinition, AddServiceDefinition, AddStringValueStreamEntry, AddStringValueStreamEntry, AddTags, AddThingCodeValueStreamEntry, AddThingCodeValueStreamEntry, AddVec2ValueStreamEntry, AddVec2ValueStreamEntry, AddVec3ValueStreamEntry, AddVec3ValueStreamEntry, AddVec4ValueStreamEntry, AddVec4ValueStreamEntry, checkDemandRead, checkPropertyName, checkValueStream, cleanupThing, DisableAlertsForProperty, DisableAllAlerts, DisableSubscription, DisableSubscription, DisableThing, dispatchBackgroundEvent, dispatchEvent, dispose, EnableAlertsForProperty, EnableAllAlerts, EnableSubscription, EnableSubscription, EnableThing, fireEvent, getAlertConfigurations, GetAlertDefinition, GetAlertDefinitions, getAlerts, getAlertsForProperty, GetAlertStatus, GetAlertStatuses, GetAlertStatusesForProperty, GetAlertSummary, GetAlertSummaryForProperty, GetAllAnomalyAlertTrainingStatistics, getAllImplementedThingShapes, getAllImplementedThingTemplates, GetAnomalyAlertTrainingStatisticsForAlert, GetAnomalyAlertTrainingStatisticsForProperty, GetAvatar, GetBooleanAlertParameter, GetBooleanPropertyValue, GetDateTimeAlertParameter, GetDateTimePropertyValue, getDependencies, getEffectiveAlertConfiguration, getEffectiveAlertDefinition, getEffectiveEventDefinition, getEffectiveIdentifier, GetEffectiveLocalPropertyBinding, getEffectiveLocalPropertyBindings, GetEffectiveLocalPropertyBindings, getEffectivePropertyDefinition, GetEffectivePropertyLogging, getEffectiveRemoteEventBindings, getEffectiveRemotePropertyBindings, getEffectiveRemoteServiceBindings, getEffectiveServiceDefinition, getEffectiveValueStreamName, getEntityType, GetHomeMashup, getIdentifier, GetIdentifier, GetImagePropertyValue, GetImplementedShapes, getImplementedThingTemplates, GetIncomingLocalPropertyBinding, GetIncomingLocalPropertyBindings, getInstanceEventDefinition, getInstanceEventDefinitions, getInstanceMultiEventSubscriptions, getInstancePropertyDefinition, getInstancePropertyDefinitionIfVisible, getInstancePropertyDefinitions, getInstancePublicServiceDefinitions, getInstanceServiceDefinition, getInstanceServiceDefinitions, getInstanceShape, getInstanceSubscriptions, GetIntegerAlertParameter, GetIntegerPropertyValue, GetLocalAlertDefinitions, GetLocallyImplementedShapes, GetLocalPropertyBinding, GetLocationAlertParameter, GetLocationPropertyValue, GetLoggedProperties, GetLongAlertParameter, GetLongPropertyValue, GetMashups, GetNamedProperties, GetNamedPropertyValues, GetNamedPropertyValuesVTQ, GetNamedPropertyValuesVTQA, GetNetworks, GetNumberAlertParameter, GetNumberPropertyValue, GetNumericLoggedProperties, getProperties, getProperty, getPropertyAckStatus, getPropertyAlertStatus, GetPropertyLogging, getPropertyQuality, GetPropertyQuality, getPropertyTime, GetPropertyTime, getPropertyType, getPropertyValue, getPropertyValue, getPropertyValues, GetPropertyValues, getPropertyValuesAsInfoTable, GetPropertyValuesAsMultiRowTable, GetPropertyValuesVTQ, GetPropertyValuesVTQA, GetPublished, GetRemoteEventBinding, GetRemotePropertyBinding, GetRemoteServiceBinding, getState, GetStringAlertParameter, GetStringPropertyValue, GetThingCodePropertyValue, GetThingGroupDelegatedVisibilityPermissions, GetThingRelationships, GetThingSummaryInformation, getThingTemplate, GetThingTemplate, getThingTemplateName, GetValueStream, getValueStreamName, GetVec2PropertyValue, GetVec3PropertyValue, GetVec4PropertyValue, HasAlert, hasEventDefinition, hasLocalEventDefinition, hasLocalPropertyDefinition, hasLocalServiceDefinition, hasProperty, hasPropertyAndIsVisible, hasPropertyDefinition, hasServiceDefinition, HavePropertiesChangedSince, implementsShape, ImplementsShape, implementsTemplate, initializeEntity, initializeProperty, isAlwaysAvailableService, isBuiltInEvent, isBuiltInProperty, IsDerivedFromTemplate, IsDynamicSubscriptionCreated, isEnabled, IsEnabled, isEventRemote, isExternallySubscribed, IsInNetwork, isLocallySubscribed, isLocalProperty, isPropertyEvent, isPropertyRemote, isPublished, isRunning, isServiceRemote, isSubscribed, preprocessSetPropertyVTQ, processAPIServiceRequest, processServiceRequest, processStartNotification, PurgeAllPropertyHistory, PurgePropertyHistory, PurgeSelectedPropertyHistory, QueryAlertHistory, QueryAlertSummary, QueryBooleanPropertyHistory, QueryBooleanPropertyHistory, QueryDateTimePropertyHistory, QueryDateTimePropertyHistory, QueryImagePropertyHistory, QueryImagePropertyHistory, QueryInfoTablePropertyHistory, QueryInfoTablePropertyHistory, QueryIntegerPropertyHistory, QueryIntegerPropertyHistory, QueryLocationPropertyHistory, QueryLocationPropertyHistory, QueryLongPropertyHistory, QueryLongPropertyHistory, QueryNamedPropertyHistory, QueryNamedPropertyHistory, QueryNamedPropertyHistory, QueryNumberPropertyHistory, QueryNumberPropertyHistory, QueryPropertyHistory, QueryPropertyHistory, QueryPropertyHistory, QueryStringPropertyHistory, QueryStringPropertyHistory, QueryThingCodePropertyHistory, QueryThingCodePropertyHistory, QueryVec2PropertyHistory, QueryVec2PropertyHistory, QueryVec3PropertyHistory, QueryVec3PropertyHistory, QueryVec4PropertyHistory, QueryVec4PropertyHistory, QueuePostCommitEvent, RemoveAlert, RemoveDynamicSubscription, RemoveEventDefinition, RemoveLocalPropertyBinding, RemovePropertyDefinition, RemoveRemoteEventBinding, RemoveRemotePropertyBinding, RemoveRemoteServiceBinding, RemoveServiceDefinition, RestartThing, SetBooleanAlertParameter, SetDateTimeAlertParameter, SetDescription, SetIdentifier, SetIntegerAlertParameter, SetLocalPropertyBinding, SetLocalPropertyBinding, SetLocationAlertParameter, SetNumberAlertParameter, SetPropertyLogging, setPropertyValue, setPropertyVTQ, setPropertyVTQ, SetPublished, SetRemoteEventBinding, SetRemotePropertyBinding, SetRemotePropertyBinding, SetRemoteServiceBinding, SetStringAlertParameter, SetTags, setThingTemplateName, SetUnitsForNumericPropertyDefinition, SetValueStream, UpdatePropertyValues, UpdatePropertyValuesBatched, validateConfiguration, WritePropertiesToStream
Methods inherited from class com.thingworx.entities.RootEntity
AddConfigurationTableDefinition, AddConfigurationTableDefinition, addDesignTimePermission, AddDesignTimePermission, addRunTimePermission, AddRunTimePermission, addVisibilityPermission, AddVisibilityPermission, CheckDesignTimePermission, CheckDesignTimePermissionForGroup, CheckDesignTimePermissionForUser, CheckPermission, CheckPermissionForGroup, CheckPermissionForUser, cleanupEntity, DeleteAllConfigurationTableRows, DeleteConfigurationTable, DeleteConfigurationTableRows, DeleteConfigurationTableRows, deleteDesignTimePermission, DeleteDesignTimePermission, deleteRunTimePermission, DeleteRunTimePermission, deleteVisibilityPermission, DeleteVisibilityPermission, getAspects, getAvatarContent, GetAvatarURL, GetConfigurationChangeHistory, getConfigurationSetting, getConfigurationTable, GetConfigurationTable, GetConfigurationTableDefinition, GetConfigurationTableRow, GetConfigurationTables, GetDescription, getDesignTimePermissions, GetDesignTimePermissions, GetDesignTimePermissionsAsJSON, getDocumentationContent, getEntityTypeAsString, GetEventDefinition, GetEventDefinitions, GetIncomingDependencies, GetIncomingDependenciesAsNetwork, GetInstanceMetadataAsJSON, GetInstanceMetadataWithPermissionsAsJSON, GetLastModifiedDate, GetMetadata, GetMetadataAsJSON, GetMetadataWithPermissionsAsJSON, GetOutgoingDependencies, GetOutgoingDependenciesAsNetwork, getOwner, GetOwner, GetPermissionsForCurrentUser, GetPermissionsForGroup, GetPermissionsForUser, GetProjectName, GetPropertyDefinition, GetPropertyDefinitions, getRunTimePermissions, GetRunTimePermissions, GetRunTimePermissionsAsJSON, GetServiceDefinition, GetServiceDefinitions, getStringConfigurationSetting, getStringConfigurationSettingWithDefault, GetSummaryInformation, getTags, GetTags, GetTagsAsInfoTable, getVisibilityPermissions, GetVisibilityPermissions, GetVisibilityPermissionsAsJSON, HasIncomingDependencies, HasOutgoingDependencies, isEditable, isEditableExtensionObject, isEditableSystemObject, isExtensionObject, IsMultiRowTable, isOwner, isSystemObject, isThemeObject, isVisible, isVisible, ListDeprecatedUsage, persistDesignTimePermissions, persistRunTimePermissions, persistVisibilityPermissions, preInitializeEntity, RemoveTags, SaveConfigurationTables, SetAvatar, setConfigurationSetting, SetConfigurationTable, SetConfigurationTableRows, setDesignTimePermissions, SetDesignTimePermissionsAsJSON, setDocumentationContent, setExtensionObject, SetHomeMashup, setLastModifiedDate, SetMultiRowConfigurationTable, setOwner, SetOwner, SetProjectName, setRunTimePermissions, SetRunTimePermissionsAsJSON, setStringConfigurationSetting, setVisibilityPermissions, SetVisibilityPermissionsAsJSON, toJSON, toJSONDefinition, UpdateProjectDependencies
Methods inherited from class com.thingworx.persistence.common.PersistableNamedObject
getID, hasID, isTransient
Methods inherited from class com.thingworx.types.NamedObject
getDescription, getName, setDescription, setName, toValueCollection
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.thingworx.types.INamedObject
getDescription
Methods inherited from interface com.thingworx.entities.interfaces.IPersistable
getID, hasID
Methods inherited from interface com.thingworx.security.permissions.ISecurable
getID, getName
Methods inherited from interface com.thingworx.entities.interfaces.IShapeProvider
getName
Methods inherited from interface com.thingworx.accesscontrol.ISupportsAccessModifier
getAccessModifier, getAccessModifierScope, getExemptList, hasAccessModifier, isInternalAccess, isPrivateAccess, isRestrictedAccess
Methods inherited from interface com.thingworx.deprecation.ISupportsDeprecation
getDeprecated, isDeprecated, isDeprecatedBefore, since
-
Field Details
-
STORE_AND_FORWARD_IS_NOT_ENABLED
- See Also:
-
-
Constructor Details
-
RemoteThing
public RemoteThing()
-
-
Method Details
-
initializeThing
@ThingworxExtensionApiMethod(since={9,0}, canOverride=true) protected void initializeThing(ContextType contextType) throws Exception Description copied from class:Thing
An initialization hook for subclasses of
Thing
. Some resources ofThing
may not be available at this point in the lifecycle.- Overrides:
initializeThing
in classThing
- Throws:
Exception
- If an error occurs
-
startThing
@ThingworxExtensionApiMethod(since={9,0}, canOverride=true, requiresSuper=true) protected final void startThing(ContextType contextType) throws Exception Description copied from class:Thing
A startup hook for subclasses of
Thing
.- Overrides:
startThing
in classThing
- Throws:
Exception
- If an error occurs
Starts the RemoteThing by binding to the endpoint registered to it.
-
stopThing
@ThingworxExtensionApiMethod(since={9,0}, canOverride=true) protected final void stopThing(ContextType contextType) throws Exception Description copied from class:Thing
A shutdown hook for subclasses of
Thing
. -
getLastConnectionTime
- Specified by:
getLastConnectionTime
in interfaceIConnectedDevice
-
isConnected
- Specified by:
isConnected
in interfaceIConnectedDevice
-
checkConnection
@ThingworxExtensionApiMethod(since={7,4}) public void checkConnection() throws CouldNotConnectException- Throws:
CouldNotConnectException
- If an error occurs
-
SetPropertyValues
@ThingworxExtensionApiMethod(since={6,6}) public void SetPropertyValues(InfoTable values) throws 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 classThing
- Parameters:
values
- Property values - INFOTABLE- Throws:
Exception
- If any of the property values caused an error
-
processRemoteService
@ThingworxExtensionApiMethod(since={7,4}) protected InfoTable processRemoteService(IServiceProvider serviceProvider, ServiceDefinition serviceDefinition, ValueCollection params) throws Exception - Throws:
Exception
- If an error occurs
-
executeRemoteService
@ThingworxExtensionApiMethod(since={7,4}) public InfoTable executeRemoteService(ServiceDefinition def, ValueCollection params, boolean isPrivate) throws 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.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 Exception- Service Category:
- Metadata
- Service Description:
- Return the metadata for the connected thing.
- Returns:
- result Connected Thing metadata - JSON
- Throws:
Exception
- If an error occurs
-
UpdateSubscribedPropertyValuesBatched
@ThingworxExtensionApiMethod(since={9,5}) public void UpdateSubscribedPropertyValuesBatched(InfoTable batches) throws 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:
Exception
- If an error occurs
-
UpdateSubscribedPropertyValues
@ThingworxExtensionApiMethod(since={7,4}) public void UpdateSubscribedPropertyValues(InfoTable values) throws Exception - Service Category:
- Updates
- Service Description:
- Write subscribed property values for a connected thing.
- Parameters:
values
- Collection of properties to be updated - INFOTABLE- Throws:
Exception
- If an error occurs
-
ProcessRemoteEvents
@ThingworxExtensionApiMethod(since={7,4}) public void ProcessRemoteEvents(InfoTable values) throws Exception - Service Category:
- Updates
- Service Description:
- Process remote events.
- Parameters:
values
- Collection of events to be dispatched - INFOTABLE- Throws:
Exception
- If an error occurs
-
GetPropertySubscriptions
@ThingworxExtensionApiMethod(since={7,4}) public InfoTable GetPropertySubscriptions() throws Exception- Throws:
Exception
- If an error occurs
-
GetPropertySubscriptions
@ThingworxExtensionApiMethod(since={8,0}) public InfoTable GetPropertySubscriptions(org.json.JSONObject options) throws 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:
Exception
- If an error occurs
-
GetEventSubscriptions
- 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:
Exception
- If an error occurs
-
SendQueuedTasks
- Service Category:
- Queueing
- Service Description:
- Sends any queued tasks to the connected thing.
- Throws:
Exception
- If an error occurs
-
SendMaxQueuedTasks
@ThingworxExtensionApiMethod(since={7,4}) public Integer SendMaxQueuedTasks(Integer maxCount) throws 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:
Exception
- If an error occurs
-
GetQueuedTasks
- Service Category:
- Queueing
- Service Description:
- Retrieve any tasks for this connected thing.
- Returns:
- result Edge things - INFOTABLE - Aspects {dataShape:MessageStoreList}
- Throws:
Exception
- If an error occurs
-
callService
@ThingworxExtensionApiMethod(since={7,4}) public InfoTable callService(String serviceName, ValueCollection params, BaseTypes resultType) throws Exception - Throws:
Exception
- If an error occurs
-
AddDynamicRemoteSubscription
@ThingworxExtensionApiMethod(since={7,4}) public void AddDynamicRemoteSubscription(String thingName, String eventName, String propertyName, String serviceName) throws Exception - Parameters:
thingName
- Thing name - THINGNAMEeventName
- Event name - STRINGpropertyName
- Property name - STRINGserviceName
- Remote service name - STRING- Throws:
Exception
- If an error occurs
-
RemoveDynamicRemoteSubscription
@ThingworxExtensionApiMethod(since={7,4}) public void RemoveDynamicRemoteSubscription(String thingName, String eventName, String propertyName) throws Exception - Parameters:
thingName
- Thing name - THINGNAMEeventName
- Event name - STRINGpropertyName
- Property name - STRING- Throws:
Exception
- If an error occurs
-