Package com.thingworx.subscriptions
Class Subscription
java.lang.Object
com.thingworx.types.events.EventDescriptor
com.thingworx.subscriptions.BaseSubscription
com.thingworx.subscriptions.Subscription
- All Implemented Interfaces:
ICharacteristic
,IDiffableObject
,IAspectContainer
,INamedObject
,Cloneable
@ThingworxExtensionApiClass(since={6,6},
canInstantiate=true)
public final class Subscription
extends BaseSubscription
implements ICharacteristic, Cloneable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetOwner()
Returns a reference to the entity that owns the subscription.Deprecated.Methods inherited from class com.thingworx.subscriptions.BaseSubscription
getDescription, getName, isAsync, isEnabled
Methods inherited from class com.thingworx.types.events.EventDescriptor
getAlertName, getEventDescriptor, getEventName, getSource, getSourceProperty, isAlertEvent, isAnyEvent, isPostCommitEvent, isPropertyEvent, setAlertName, setEventName, setSource, setSourceProperty
-
Constructor Details
-
Subscription
public Subscription()
-
-
Method Details
-
getSourceName
@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={8,0}) public String getSourceName()Deprecated.UsegetOwner()
instead.- Returns:
- the name of the entity owning this subscription
-
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
-
getOwner()
instead.