Package com.thingworx.subscriptions
Class MultiEventSubscription
- java.lang.Object
-
- com.thingworx.subscriptions.MultiEventSubscription
-
- All Implemented Interfaces:
ICharacteristic
,IDiffableObject
,IAspectContainer
,INamedObject
,java.lang.Cloneable
@ThingworxExtensionApiClass(since={9,5}, canInstantiate=true) public class MultiEventSubscription extends java.lang.Object implements ICharacteristic, java.lang.Cloneable, IAspectContainer, INamedObject, IDiffableObject
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Integer
VERSION_LEGACY
static java.lang.Integer
VERSION_MULTI
-
Constructor Summary
Constructors Constructor Description MultiEventSubscription()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescription()
java.util.List<EventDescriptor>
getEvents()
java.lang.String
getName()
Gets the name of the subscription.EntityReference
getOwner()
Returns a reference to the entity that owns the subscription.boolean
isEnabled()
-
-
-
Method Detail
-
getOwner
@ThingworxExtensionApiMethod(since={8,0}) public EntityReference getOwner()
Returns a reference to the entity that owns the subscription.This entity may not necessarily be the subscriber; for example, a thing template or thing shape may define a subscription and thus be the "owner", but the thing that implements the template or shape would be the "subscriber".
The owner is referred to as the "source" in other classes, but this collides with the concept of a "source" on EventDescriptor and can be confusing to developers, so it is explicitly called out as the "owning entity" here.
- Returns:
- a reference to the entity that owns the subscription
-
getEvents
@ThingworxExtensionApiMethod(since={9,5}) public java.util.List<EventDescriptor> getEvents()
-
getDescription
@ThingworxExtensionApiMethod(since={9,5}) public java.lang.String getDescription()
- Specified by:
getDescription
in interfaceINamedObject
-
getName
@ThingworxExtensionApiMethod(since={9,5}) public java.lang.String getName()
Gets the name of the subscription. Before 8.4.0, Subscriptions did not have names, so this method maintains backwards compatibility by setting the name from the event descriptor if no name is provided before this method is called.- Specified by:
getName
in interfaceINamedObject
-
isEnabled
@ThingworxExtensionApiMethod(since={9,5}) public boolean isEnabled()
-
-