public interface ModelNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Model objects in this Warehouse. This
also includes existing models that may appear or disappear due to changes
in the Warehouse 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
ModelLookupSession.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRegisterForModelNotifications()
Tests if this user can register for
Model
notifications. |
Warehouse |
getWarehouse()
Gets the
Warehouse associated with this session. |
Id |
getWarehouseId()
Gets the
Warehouse Id associated with
this session. |
void |
registerForChangedModel(Id modelId)
Registers for notification of an updated model.
|
void |
registerForChangedModels()
Registers for notification of updated models.
|
void |
registerForDeletedModel(Id modelId)
Registers for notification of a deleted model.
|
void |
registerForDeletedModels()
Registers for notification of deleted models.
|
void |
registerForNewModels()
Register for notifications of new models.
|
void |
useFederatedWarehouseView()
Federates the view for methods in this session.
|
void |
useIsolatedWarehouseView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getWarehouseId()
Warehouse Id associated with
this session. Warehouse Id associated with this sessionmandatory - This method must be implemented. Warehouse getWarehouse() throws OperationFailedException, PermissionDeniedException
Warehouse associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canRegisterForModelNotifications()
Model
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 useFederatedWarehouseView()
mandatory - This method is must be implemented. void useIsolatedWarehouseView()
mandatory - This method is must be implemented. void registerForNewModels()
throws OperationFailedException,
PermissionDeniedException
ModelReceiver.newModels() is invoked when a new Model
appears in this warehouse.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedModels()
throws OperationFailedException,
PermissionDeniedException
ModelReceiver.changedModels() is invoked when a model in this
warehouse is changed.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedModel(Id modelId) throws OperationFailedException, PermissionDeniedException
ModelReceiver.changedModels() is invoked when the specified
model in this warehouse is changed.modelId - the Id of the Model to
monitorNullArgumentException - modelId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedModels()
throws OperationFailedException,
PermissionDeniedException
ModelReceiver.deletedModels() is invoked when a model is
deleted or removed from this warehouse.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedModel(Id modelId) throws OperationFailedException, PermissionDeniedException
ModelReceiver.deletedModels() is invoked when the specified
model is deleted or removed from this warehouse.modelId - the Id of the Model to
monitorNullArgumentException - modelId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.