public interface SubscriptionNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Subscription
objects. This session is intended for
consumers needing to synchronize their state with this service without the
use of polling. Notifications are cancelled when this session is closed.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeSubscriptionNotification(Id notificationId)
Acknowledge a subscription notification.
|
boolean |
canRegisterForSubscriptionNotifications()
Tests if this user can register for
Subscription
notifications. |
Publisher |
getPublisher()
Gets the
Publisher associated with this session. |
Id |
getPublisherId()
Gets the
Publisher Id associated with
this session. |
void |
registerForChangedSubscription(Id subscriptionId)
Registers for notification of an updated subscription.
|
void |
registerForChangedSubscriptions()
Registers for notification of updated subscriptions.
|
void |
registerForChangedSubscriptionsByGenusType(Type subscriptionGenusType)
Registers for notification of updated subscriptions of the given genus
type.
|
void |
registerForChangedSubscriptionsForDispatch(Id dispatchId)
Register for notifications of changed subscriptions for the given
dispatch
Id. |
void |
registerForChangedSubscriptionsForSubscriber(Id resourceId)
Register for notifications of changed subscriptions for the given
resource
Id. |
void |
registerForDeletedSubscription(Id subscriptionId)
Registers for notification of a deleted subscription.
|
void |
registerForDeletedSubscriptions()
Registers for notification of deleted subscriptions.
|
void |
registerForDeletedSubscriptionsByGenusType(Type subscriptionGenusType)
Registers for notification of deleted subscriptions of the given genus
type.
|
void |
registerForDeletedSubscriptionsForDispatch(Id dispatchId)
Register for notifications of changed subscriptions for the given
dispatch
Id. |
void |
registerForDeletedSubscriptionsForSubscriber(Id resourceId)
Register for notifications of changed subscriptions for the given
subscriber
Id. |
void |
registerForNewSubscriptions()
Register for notifications of new subscriptions.
|
void |
registerForNewSubscriptionsByGenusType(Type subscriptionGenusType)
Register for notifications of new subscriptions of the given genus
type.
|
void |
registerForNewSubscriptionsForDispatch(Id dispatchId)
Register for notifications of new subscriptions for the given
reference
Id. |
void |
registerForNewSubscriptionsForSubscriber(Id resourceId)
Register for notifications of new subscriptions for the given resource
Id. |
void |
reliableSubscriptionNotifications()
Reliable notifications are desired.
|
void |
unreliableSubscriptionNotifications()
Unreliable notifications are desired.
|
void |
useFederatedPublisherView()
Federates the view for methods in this session.
|
void |
useIsolatedPublisherView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getPublisherId()
Publisher
Id
associated with
this session. Publisher Id
associated with this sessionmandatory
- This method must be implemented. Publisher getPublisher() throws OperationFailedException, PermissionDeniedException
Publisher
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForSubscriptionNotifications()
Subscription
notifications. A return of true does not guarantee successful
authorization. A return of false indicates that it is known all
methods in this session will result in a PERMISSION_DENIED.
This is intended as a hint to an application that may opt not
to offer notification operations. false
if notification methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useFederatedPublisherView()
mandatory
- This method is must be implemented. void useIsolatedPublisherView()
mandatory
- This method is must be implemented. void reliableSubscriptionNotifications()
acknowledgeSubscriptionNotification()
.mandatory
- This method is must be implemented. void unreliableSubscriptionNotifications()
mandatory
- This method is must be implemented. void acknowledgeSubscriptionNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewSubscriptions() throws OperationFailedException, PermissionDeniedException
SubscriptionReceiver.newSubscriptions()
is invoked when a new
Subscription
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewSubscriptionsByGenusType(Type subscriptionGenusType) throws OperationFailedException, PermissionDeniedException
SubscriptionReceiver.newSubscriptions()
is
invoked when a new Subscription
is created.subscriptionGenusType
- a subscription genus typeNullArgumentException
- subscriptionGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewSubscriptionsForSubscriber(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id.
SubscriptionReceiver.newSubscriptions()
is invoked when a new Subscription
is created.resourceId
- the Id
of the reference to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewSubscriptionsForDispatch(Id dispatchId) throws OperationFailedException, PermissionDeniedException
Id.
SubscriptionReceiver.newSubscriptions()
is invoked when a new
Subscription
is created.dispatchId
- the Id
of the dispatch to monitorNullArgumentException
- dispatchId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedSubscriptions() throws OperationFailedException, PermissionDeniedException
SubscriptionReceiver.changedSubscriptions()
is invoked when a
subscription is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedSubscriptionsByGenusType(Type subscriptionGenusType) throws OperationFailedException, PermissionDeniedException
SubscriptionReceiver.changedSubscriptions()
is
invoked when a subscription is changed.subscriptionGenusType
- a subscription genus typeNullArgumentException
- subscriptionGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedSubscriptionsForSubscriber(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id.
SubscriptionReceiver.changedSubscriptions()
is invoked when a
Subscription
for the resource is changed.resourceId
- the Id
of the resource to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedSubscriptionsForDispatch(Id dispatchId) throws OperationFailedException, PermissionDeniedException
Id.
SubscriptionReceiver.changedSubscription()
is invoked when a
Subscription
for the dispatch is changed.dispatchId
- the Id
of the dispatch to monitorNullArgumentException
- dispatchId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedSubscription(Id subscriptionId) throws OperationFailedException, PermissionDeniedException
SubscriptionReceiver.changedSubscriptions()
is invoked when
the specified subscription is changed.subscriptionId
- the Id
of the
Subscription
to monitorNullArgumentException
- subscriptionId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedSubscriptions() throws OperationFailedException, PermissionDeniedException
SubscriptionReceiver.deletedSubscriptions()
is invoked when a
subscription is deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedSubscriptionsByGenusType(Type subscriptionGenusType) throws OperationFailedException, PermissionDeniedException
SubscriptionReceiver.deletedSubscriptions()
is
invoked when a subscription is deleted.subscriptionGenusType
- a subscription genus typeNullArgumentException
- subscriptionGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedSubscriptionsForSubscriber(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id.
SubscriptionReceiver.deletedSubscriptions()
is invoked when a
Subscription
for the resource is deleted.resourceId
- the Id
of the resource to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedSubscriptionsForDispatch(Id dispatchId) throws OperationFailedException, PermissionDeniedException
Id.
SubscriptionReceiver.deletedSubscriptions()
is invoked when a
Subscription
for the dispatch is deleted.dispatchId
- the Id
of the dispatch to monitorNullArgumentException
- dispatchId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedSubscription(Id subscriptionId) throws OperationFailedException, PermissionDeniedException
SubscriptionReceiver.deletedSubscriptions()
is invoked when
the specified subscription is deleted.subscriptionId
- the Id
of the
Subscription
to monitorNullArgumentException
- subscriptionId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.