Interface ISubscriptionInfo
- All Known Subinterfaces:
ISubscription
public interface 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[].from - boolean defining whether the Relation is from or to the specified Thing. A value of true means 'from'.
- 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 separated by a comma.
-
Valid values are:
- "email" If the target is an IUser, an e-mail will be sent
- "portal" If the target is an IUser, a notification will be placed in their Inbox
- "thing" The target Thing will be instantiated and its onMessage method will be called
- "queue" The message will be forwarded to the target ID via a JMS Queue
- "topic" The message will be forwarded to the target ID via a JMS Topic
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Notifications are delivered as a daily digeststatic final int
Mast for all delivery typesstatic final int
Mast for all digest type deliveriesstatic final int
static final int
static final int
Notification is delivered by email, if one is defined for the subscriberstatic final int
static final int
static final int
static final int
Notification is delivered to subscriber portal inboxstatic final int
Notification is delivered as a thing eventstatic final int
Notifications are delivered as a weekly digest -
Method Summary
Modifier and TypeMethodDescriptionfindCriterion
(ICriterion criterion) Searches by value.Array of ICriterionint
Returns delivery mode set for this subscription.getOwner()
The information resource ID that generates eventsint
Determines whether the subscription is enabled or disabled.The principal interested in events.boolean
hasCriterion
(ICriterion criterion) Searches by comparing Criterion ThingIDboolean
hasCriterion
(IThingID criterion) Searches by comparing Criterion ThingIDboolean
Indicates if this is a recursive subscriptionvoid
setCriteriaIDs
(IThingIDList criteria) Note: this is an expensive operation.void
setDeliveryModes
(int modes) save delivery mode.void
Enables or disables the subscriptionvoid
setRecursive
(boolean recursive) Sets if this is a recursive subscriptionvoid
setResource
(IThingID sourceID) Set the event resource ThingID.void
setStatus
(int status) Enables or disables the subscriptionvoid
setSubscriber
(ISubscriber target) Set the subscriber.
-
Field Details
-
EMAIL_DELIVERY
static final int EMAIL_DELIVERYNotification is delivered by email, if one is defined for the subscriber- See Also:
-
PORTAL_DELIVERY
static final int PORTAL_DELIVERYNotification is delivered to subscriber portal inbox- See Also:
-
THING_DELIVERY
static final int THING_DELIVERYNotification is delivered as a thing event- See Also:
-
HTTP_DELIVERY
static final int HTTP_DELIVERY- See Also:
-
IM_DELIVERY
static final int IM_DELIVERY- See Also:
-
DELIVERY_TYPE_MASK
static final int DELIVERY_TYPE_MASKMast for all delivery types- See Also:
-
DAILY_DELIVERY
static final int DAILY_DELIVERYNotifications are delivered as a daily digest- See Also:
-
WEEKLY_DELIVERY
static final int WEEKLY_DELIVERYNotifications are delivered as a weekly digest- See Also:
-
DIGEST_DELIVERY_MASK
static final int DIGEST_DELIVERY_MASKMast for all digest type deliveries- See Also:
-
ENABLED
static final int ENABLED- See Also:
-
DISABLED_BY_USER
static final int DISABLED_BY_USER- See Also:
-
DISABLED_BY_SYSTEM
static final int DISABLED_BY_SYSTEM- See Also:
-
-
Method Details
-
getStatus
Determines whether the subscription is enabled or disabled.- Throws:
MetaException
-
setStatus
Enables or disables the subscription- Throws:
MetaException
- See Also:
-
ISubscriptionStatus
-
getResource
The information resource ID that generates events- Throws:
MetaException
-
getSubscriber
The principal interested in events.- Throws:
MetaException
-
setResource
Set the event resource ThingID.- Throws:
MetaException
-
setSubscriber
Set the subscriber.- Throws:
MetaException
-
getCriteriaList
Array of ICriterion- Throws:
MetaException
-
setCriteriaIDs
Note: this is an expensive operation.- Throws:
MetaException
-
getOwner
- Throws:
MetaException
-
setOwner
Enables or disables the subscription- Throws:
MetaException
- See Also:
-
ISubscriptionStatus
-
hasCriterion
Searches by comparing Criterion ThingID- Throws:
MetaException
-
hasCriterion
Searches by comparing Criterion ThingID- Throws:
MetaException
-
findCriterion
Searches by value. All values must match.- Throws:
MetaException
-
setDeliveryModes
save delivery mode. The mode is a bit setting. Each bit represents a type of delivery agent- Throws:
MetaException
-
getDeliveryModes
Returns delivery mode set for this subscription. See delivery modes constants- Throws:
MetaException
-
isRecursive
Indicates if this is a recursive subscription- Returns:
- Throws:
MetaException
-
setRecursive
Sets if this is a recursive subscription- Parameters:
recursive
-- Throws:
MetaException
-