Annotation Interface ThingworxMultiEventSubscription
@Target(ANNOTATION_TYPE)
@Retention(RUNTIME)
@ThingworxExtensionApiAnnotation(since={9,5,1})
public @interface ThingworxMultiEventSubscription
Defines a multi event subscription that the entity wishes to handle. Subscriptions defined with this annotation can target multiple
standard events and property events, and may also specify a source entity. The source entity should be another entity the
that is part of the platform,extension, or an entity in a dependent extension.
Each event is defined as ThingworxSubscriptionEvent
- See Also:
-
Required Element Summary
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionString[]
Optional parameter: an array of key-value pairs associated with colons (e.g., "aspect1:value1", "aspect2:value2", …) describing aspects applicable to the field definition.
Optional parameter: A short description for the service.boolean
Optional parameter: whether the subscription should listen for events.
Required parameter: a collection of ThingworxSubscriptionEvent handled by this class.
Required parameter: The name of the Subscription.
-
Element Details
-
name
String name
Required parameter: The name of the Subscription.- Default:
""
-
description
String description
Optional parameter: A short description for the service. The description should provide information on functionality of the Subscription and any other pertinent information for users.- Default:
""
-
enabled
boolean enabled
Optional parameter: whether the subscription should listen for events. Note that if it is intended for subscriptions to listen for events immediately, then you must specify this parameter and assign to true.- Default:
false
-
handler
String handler
Required parameter: the name of the service that should be invoked whenever the subscription receives an event. The service must belong to the entity defining the subscription. -
aspects
String[] aspects
Optional parameter: an array of key-value pairs associated with colons (e.g., "aspect1:value1", "aspect2:value2", …) describing aspects applicable to the field definition. Accepted boolean aspects: isDistributed and isStateful (default - false). In cluster mode, When isStateful is set to true, isDistributed must be set to true as well. In single mode, isDistributed must be set to false.- See Also:
- Default:
{}
-
events
ThingworxSubscriptionEvent[] events
Required parameter: a collection of ThingworxSubscriptionEvent handled by this class.- Default:
{}
-