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
-
Method Summary
Modifier and TypeMethodDescriptiongetEventHandler
(String handlerName)
Returns the event handler with the given name.getEventHandlers
(String subscriptionName)
Returns all event handlers with the given handler name.getServiceHandler
(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
-
Constructor Details
-
ThingShapeInstance
public ThingShapeInstance()
-
-
Method Details
-
getServiceHandler
@ThingworxExtensionApiMethod(since={6,6}) public IServiceHandler getServiceHandler(String serviceName) -
getContainer
-
getEventHandler
@ThingworxExtensionApiMethod(since={6,6}) public IServiceHandler getEventHandler(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(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.
-