Interface ISubscription

All Superinterfaces:
ISubscriptionInfo

public interface ISubscription extends ISubscriptionInfo
This represents the relationship between a Thing interested in events (usually a Principal) and Thing that generates events (usually an information resource). It has a 'from' and a 'to'.
  • The 'from' identifies the resource that will generate events.
    • from.id - Thing ID. A ThingID that specifies ThingType but leave the instance ID as 0 will subscribe to all Things of the specified type.
    • from.criteria[] - list of criterion specifying property and operation. Optional.
      • from.criteria[].property - ThingID of Relation that defines this property
      • from.criteria[].operation - operations to listen for as bitfield (see IEventOperation)

  • The 'to' represents where notifications will be delivered.
    • to.thing - Thing ID of user or group interested in events
    • to.deliveryMode - Delivery mechanisms. Multiple values are OR'ed together.
        Valid values are:
      • EMAIL_DELIVERY If the target is an IUser, an e-mail will be sent
      • PORTAL_DELIVERY If the target is an IUser, a notification will be placed in their Inbox
      • THING_DELIVERY The target Thing will be instantiated and its onMessage method will be called
      • HTTP_DELIVERY The message will be forwarded to the target ID via a JMS Queue
See Also: