Annotation Type 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:
    MultiEventSubscription
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String handler


      Required parameter: the name of the service that should be invoked whenever the subscription receives an event.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.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.
      java.lang.String description


      Optional parameter: A short description for the service.
      boolean enabled


      Optional parameter: whether the subscription should listen for events.
      ThingworxSubscriptionEvent[] events


      Required parameter: a collection of ThingworxSubscriptionEvent handled by this class.
      java.lang.String name


      Required parameter: The name of the Subscription.
    • Element Detail

      • handler

        java.lang.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.
      • name

        java.lang.String name


        Required parameter: The name of the Subscription.
        Default:
        ""
      • description

        java.lang.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
      • aspects

        java.lang.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:
        Aspects
        Default:
        {}
      • events

        ThingworxSubscriptionEvent[] events


        Required parameter: a collection of ThingworxSubscriptionEvent handled by this class.
        Default:
        {}