public interface JournalNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Journal
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.
Notifications are triggered with changes to the Journal
object itself. Adding and removing entries result in notifications
available from the notification session for journal entries.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeJournalNotification(Id notificationId)
Acknowledge a journal notification.
|
boolean |
canRegisterForJournalNotifications()
Tests if this user can register for
Journal
notifications. |
void |
registerForChangedJournal(Id journalId)
Registers for notification of an updated journal.
|
void |
registerForChangedJournalHierarchy()
Registers for notification of an updated journal hierarchy structure.
|
void |
registerForChangedJournalHierarchyForAncestors(Id journalId)
Registers for notification of an updated journal hierarchy structure.
|
void |
registerForChangedJournalHierarchyForDescendants(Id journalId)
Registers for notification of an updated journal hierarchy structure.
|
void |
registerForChangedJournals()
Registers for notification of updated journals.
|
void |
registerForDeletedJournal(Id journalId)
Registers for notification of a deleted journal.
|
void |
registerForDeletedJournals()
Registers for notification of deleted journals.
|
void |
registerForNewJournals()
Register for notifications of new journals.
|
void |
reliableJournalNotifications()
Reliable notifications are desired.
|
void |
unreliableJournalNotifications()
Unreliable notifications are desired.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canRegisterForJournalNotifications()
Journal
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 reliableJournalNotifications()
acknowledgeJournalNotification()
.mandatory
- This method is must be implemented. void unreliableJournalNotifications()
mandatory
- This method is must be implemented. void acknowledgeJournalNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewJournals() throws OperationFailedException, PermissionDeniedException
JournalReceiver.newJournals()
is invoked when a new
Journal
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedJournals() throws OperationFailedException, PermissionDeniedException
JournalReceiver.changedJournals()
is invoked when a journal is
changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedJournal(Id journalId) throws OperationFailedException, PermissionDeniedException
JournalReceiver.changedJournals()
is invoked when the
specified journal is changed.journalId
- the Id
of the Journal
to monitorNullArgumentException
- journalId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedJournals() throws OperationFailedException, PermissionDeniedException
JournalReceiver.deletedJournals()
is invoked when a journal is
deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedJournal(Id journalId) throws OperationFailedException, PermissionDeniedException
JournalReceiver.deletedJournals()
is invoked when the
specified journal is deleted.journalId
- the Id
of the Journal
to monitorNullArgumentException
- journalId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedJournalHierarchy() throws OperationFailedException, PermissionDeniedException
JournalReceiver.changedChildOfJournals()
is invoked
when a node experiences a change in its children.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedJournalHierarchyForAncestors(Id journalId) throws OperationFailedException, PermissionDeniedException
JournalReceiver.changedChildOfJournals()
is invoked
when the specified node or any of its ancestors experiences a change
in its children.journalId
- the Id
of the Journal
node to monitorNullArgumentException
- journalId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedJournalHierarchyForDescendants(Id journalId) throws OperationFailedException, PermissionDeniedException
JournalReceiver.changedChildOfJournals()
is invoked
when the specified node or any of its descendants experiences a change
in its children.journalId
- the Id
of the Journal
node to monitorNullArgumentException
- journalId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.