public interface BlockNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Block objects in this Oubliette. This
also includes existing blocks that may appear or disappear due to changes
in the Oubliette 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
BlockLookupSession.
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledgeBlockNotification(Id notificationId)
Acknowledge a block notification.
|
boolean |
canRegisterForBlockNotifications()
Tests if this user can register for
Block
notifications. |
Oubliette |
getOubliette()
Gets the
Oubliette associated with this session. |
Id |
getOublietteId()
Gets the
Oubliette Id associated with
this session. |
void |
registerForChangedBlock(Id blockId)
Registers for notification of an updated block.
|
void |
registerForChangedBlocks()
Registers for notification of updated blocks.
|
void |
registerForDeletedBlock(Id blockId)
Registers for notification of a deleted block.
|
void |
registerForDeletedBlocks()
Registers for notification of deleted blocks.
|
void |
registerForNewBlocks()
Register for notifications of new blocks.
|
void |
reliableBlockNotifications()
Reliable notifications are desired.
|
void |
unreliableBlockNotifications()
Unreliable notifications are desired.
|
void |
useFederatedOublietteView()
Federates the view for methods in this session.
|
void |
useIsolatedOublietteView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getOublietteId()
Oubliette Id associated with
this session. Oubliette Id associated with this sessionmandatory - This method must be implemented. Oubliette getOubliette() throws OperationFailedException, PermissionDeniedException
Oubliette associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canRegisterForBlockNotifications()
Block
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 useFederatedOublietteView()
mandatory - This method is must be implemented. void useIsolatedOublietteView()
mandatory - This method is must be implemented. void reliableBlockNotifications()
acknowledgeBlockNotification()
.mandatory - This method is must be implemented. void unreliableBlockNotifications()
mandatory - This method is must be implemented. void acknowledgeBlockNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId - the Id of the notificationOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForNewBlocks()
throws OperationFailedException,
PermissionDeniedException
BlockReceiver.newBlocks() is invoked when a new Block
appears in this oubliette.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedBlocks()
throws OperationFailedException,
PermissionDeniedException
BlockReceiver.changedBlocks() is invoked when a block in this
oubliette is changed.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedBlock(Id blockId) throws NotFoundException, OperationFailedException, PermissionDeniedException
BlockReceiver.changedBlocks() is invoked when the specified
block in this oubliette is changed.blockId - the Id of the Block to
monitorNotFoundException - a block was not found in this
oubliette identified by the given Id NullArgumentException - blockId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedBlocks()
throws OperationFailedException,
PermissionDeniedException
BlockReceiver.deletedBlocks() is invoked when a block is
deleted or removed from this oubliette.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedBlock(Id blockId) throws NotFoundException, OperationFailedException, PermissionDeniedException
BlockReceiver.deletedBlocks() is invoked when the specified
block is deleted or removed from this oubliette.blockId - the Id of the Block to
monitorNotFoundException - a block was not found identified by
the given Id NullArgumentException - blockId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.