Package com.thingworx.thingshape
Class ThingShapeInstance
- java.lang.Object
-
- com.thingworx.metadata.ThingShapeDefinitionBase
-
- com.thingworx.metadata.ThingShapeDefinition
-
- com.thingworx.implementation.ThingShapeImplementation
-
- com.thingworx.thingshape.ThingShapeInstance
-
- All Implemented Interfaces:
IDiffableObject
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class ThingShapeInstance extends ThingShapeImplementation
-
-
Constructor Summary
Constructors Constructor Description ThingShapeInstance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EntityReference
getContainer()
IServiceHandler
getEventHandler(java.lang.String handlerName)
Returns the event handler with the given name.EventHandlerSet
getEventHandlers(java.lang.String subscriptionName)
Returns all event handlers with the given handler name.IServiceHandler
getServiceHandler(java.lang.String serviceName)
-
Methods inherited from class com.thingworx.implementation.ThingShapeImplementation
getMultiEventSubscriptions, getSubscriptions
-
Methods inherited from class com.thingworx.metadata.ThingShapeDefinitionBase
getDataShapeDefinitions, getEventDefinition, getEventDefinitions, getPropertyDefinition, getPropertyDefinitions, getServiceDefinition, getServiceDefinitions, hasEventDefinition, hasPropertyDefinition, hasServiceDefinition
-
-
-
-
Method Detail
-
getServiceHandler
@ThingworxExtensionApiMethod(since={6,6}) public IServiceHandler getServiceHandler(java.lang.String serviceName)
-
getContainer
@ThingworxExtensionApiMethod(since={6,6}) public EntityReference getContainer()
-
getEventHandler
@ThingworxExtensionApiMethod(since={6,6}) public IServiceHandler getEventHandler(java.lang.String handlerName)
Returns the event handler with the given name.- Parameters:
handlerName
- - The String version of the handler name - usually the Subscription Name.- Returns:
- The first occurrence of a handler with this name or
null
if none are defined.
-
getEventHandlers
@ThingworxExtensionApiMethod(since={8,4}, deprecatedSince={9,0}) public EventHandlerSet getEventHandlers(java.lang.String subscriptionName)
Returns all event handlers with the given handler name. This method is not deprecated because the event handlers are looked up by their respective names and not which event they are firing from. This will always return an eventHandlerSet with exactly 1 entry. UsegetEventHandler(String)
instead.- Parameters:
subscriptionName
- - The String version of the handler name - usually the Subscription Name.- Returns:
- An EventHandlerSet with the handler associated with the provided handlerName or
null
if none are defined.
-
-