public interface BranchNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Branch objects in this Journal. This also
includes existing branches that may appear or disappear due to changes in
the Journal hierarchy, 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.
The two views defined in this session correspond to the views in the
BranchLookupSession.
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledgeBranchNotification(Id notificationId)
Acknowledge a branch notification.
|
boolean |
canRegisterForBranchNotifications()
Tests if this user can register for
Branch
notifications. |
Journal |
getJournal()
Gets the
Journal associated with this session. |
Id |
getJournalId()
Gets the
Journal Id associated with this
session. |
void |
registerForChangedBranch(Id branchId)
Registers for notification of an updated branch.
|
void |
registerForChangedBranches()
Registers for notification of updated branches.
|
void |
registerForDeletedBranch(Id branchId)
Registers for notification of a deleted branch.
|
void |
registerForDeletedBranches()
Registers for notification of deleted branches.
|
void |
registerForNewBranches()
Register for notifications of new branches.
|
void |
reliableBranchNotifications()
Reliable notifications are desired.
|
void |
unreliableBranchNotifications()
Unreliable notifications are desired.
|
void |
useFederatedJournalView()
Federates the view for methods in this session.
|
void |
useIsolatedJournalView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getJournalId()
Journal Id associated with this
session. Journal Id associated with this sessionmandatory - This method must be implemented. Journal getJournal() throws OperationFailedException, PermissionDeniedException
Journal associated with this session. Journal associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canRegisterForBranchNotifications()
Branch
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 useFederatedJournalView()
mandatory - This method is must be implemented. void useIsolatedJournalView()
mandatory - This method is must be implemented. void reliableBranchNotifications()
acknowledgeBranchNotification()
.mandatory - This method is must be implemented. void unreliableBranchNotifications()
mandatory - This method is must be implemented. void acknowledgeBranchNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId - the Id of the notificationOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForNewBranches()
throws OperationFailedException,
PermissionDeniedException
BranchReceiver.newBranches() is invoked when a new
Branch is appears in this journal.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedBranches()
throws OperationFailedException,
PermissionDeniedException
BranchReceiver.changedBranches() is invoked when a branch in
this journal is changed.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedBranch(Id branchId) throws OperationFailedException, PermissionDeniedException
BranchReceiver.changedBranches() is invoked when the specified
branch in this journal is changed.branchId - the Id of the Branch to
monitorNullArgumentException - branchId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedBranches()
throws OperationFailedException,
PermissionDeniedException
BranchReceiver.deletedBranches() is invoked when a branch is
deleted or removed from this journal.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedBranch(Id branchId) throws OperationFailedException, PermissionDeniedException
BranchReceiver.deletedBranches() is invoked when the specified
branch is deleted or removed from this journal.branchId - the Id of the Branch to
monitorNullArgumentException - branchId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.