public interface EventingService
Modifier and Type | Method and Description |
---|---|
void |
ack(Event eventToBeAcked,
String payloadInAck)
Send EVENT_RECEIVED event to publisher of an original event that was expecting ACK.
|
Set |
querySubscriptions(SubscriptionSelectionFilter filter)
Retrieve a list of subscriptions according to the given filter criteria.
|
void |
renewSubscription(String subscriptionId)
Renew a subscription.
|
String |
subscribe(EventSubscriptionAttributes attributes)
Subscribe for an event.
|
void |
unsubscribe(String subscriptionId)
Unsubscribe a subscription.
|
void |
unsubscribeAll()
Unsubscribe from all existing subscriptions that have been made by the
specific version of the snap-in invoking this method.
|
String subscribe(EventSubscriptionAttributes attributes)
attributes
- The EventSubscriptionAttributes
object specifying the
various properties of a subscription. The attributes will
typically specify an event family, one or more events types,
and a set of filter criteria to limit the event notifications
to events of interest.Set querySubscriptions(SubscriptionSelectionFilter filter)
filter
- A filter specifying which subscriptions to return.void renewSubscription(String subscriptionId)
Renew a subscription. Subscriptions have an expiration time of around 8 - 9 hours. This method is called by a consumer to renew a subscription.
A special event called EventingFramework:SUBSCRIPTION_EXPIRATION is sent to a consumer shortly before subscription expiration. This event makes it easy for a consumer to renew a subscription. The body of this event consists simply of a String, which is the subscription ID. A consumer receiving the event can renew the subscription by calling this method using the value contained in the Event body.
Please note that use of the SUBSCRIPTION_EXPIRING event has some important caveats. See the package level Javadoc of the Eventing Framework (com.avaya.collaboration.eventing
) for more
information.subscriptionId
- The ID of the subscription to be renewed.void unsubscribe(String subscriptionId)
subscriptionId
- The ID of the subscription to unsubscribe. Note that if a
single subscription is made for multiple event types, it is
not possible to unsubscribe for only a subset of those event
types. To achieve finer granularity with unsubscribe one must
subscribe with finer granularity.void unsubscribeAll()
void ack(Event eventToBeAcked, String payloadInAck)
eventToBeAcked
- the original event for which an ACK needs to be sent.payloadInAck
- optional String to be added into ACK event as payload. This is a free-form String, the meaning of it is only defined between publisher
and application sending the ACK.Copyright © 2023 Avaya. All rights reserved.