public interface BookNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Book
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 Book
object itself. Adding and removing comments result in notifications
available from the notification session for comments.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeBookNotification(Id notificationId)
Acknowledge a book notification.
|
boolean |
canRegisterForBookNotifications()
Tests if this user can register for
Book notifications. |
void |
registerForChangedBook(Id bookId)
Registers for notification of an updated book.
|
void |
registerForChangedBookHierarchy()
Registers for notification of an updated book hierarchy structure.
|
void |
registerForChangedBookHierarchyForAncestors(Id bookId)
Registers for notification of an updated book hierarchy structure.
|
void |
registerForChangedBookHierarchyForDescendants(Id bookId)
Registers for notification of an updated book hierarchy structure.
|
void |
registerForChangedBooks()
Registers for notification of updated books.
|
void |
registerForDeletedBook(Id bookId)
Registers for notification of a deleted book.
|
void |
registerForDeletedBooks()
Registers for notification of deleted books.
|
void |
registerForNewBooks()
Register for notifications of new books.
|
void |
reliableBookNotifications()
Reliable notifications are desired.
|
void |
unreliableBookNotifications()
Unreliable notifications are desired.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canRegisterForBookNotifications()
Book
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 reliableBookNotifications()
acknowledgeBookNotification()
.mandatory
- This method is must be implemented. void unreliableBookNotifications()
mandatory
- This method is must be implemented. void acknowledgeBookNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewBooks() throws OperationFailedException, PermissionDeniedException
BookReceiver.newBooks()
is invoked when a new Book
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedBooks() throws OperationFailedException, PermissionDeniedException
BookReceiver.changedBooks()
is invoked when a book is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedBook(Id bookId) throws OperationFailedException, PermissionDeniedException
BookReceiver.changedBooks()
is invoked when the specified book
is changed.bookId
- the Id
of the Book
to
monitorNullArgumentException
- bookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedBooks() throws OperationFailedException, PermissionDeniedException
BookReceiver.deletedBooks()
is invoked when a book is deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedBook(Id bookId) throws OperationFailedException, PermissionDeniedException
BookReceiver.deletedBooks()
is invoked when the specified book
is deleted.bookId
- the Id
of the Book
to
monitorNullArgumentException
- bookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedBookHierarchy() throws OperationFailedException, PermissionDeniedException
BookReceiver.changedChildOfBookss()
is invoked when a
node experiences a change in its children.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedBookHierarchyForAncestors(Id bookId) throws OperationFailedException, PermissionDeniedException
BookReceiver.changedChildOfBooks()
is invoked when the
specified node or any of its ancestors experiences a change in its
children.bookId
- the Id
of the Book
node
to monitorNullArgumentException
- bookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedBookHierarchyForDescendants(Id bookId) throws OperationFailedException, PermissionDeniedException
BookReceiver.changedChildOfBooks()
is invoked when the
specified node or any of its descendants experiences a change in its
children.bookId
- the Id
of the Book
node
to monitorNullArgumentException
- bookId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.