public interface ResourceNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Resource objects in this Bin. This also
includes existing resources that may appear or disappear due to changes in
the Bin 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
ResourceLookupSession.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRegisterForResourceNotifications()
Tests if this user can register for
Resource
notifications. |
Bin |
getBin()
Gets the
Bin associated with this session. |
Id |
getBinId()
Gets the
Bin Id associated with this
session. |
void |
registerForChangedResource(Id resourceId)
Registers for notification of an updated resource.
|
void |
registerForChangedResources()
Registers for notification of updated resources.
|
void |
registerForDeletedResource(Id resourceId)
Registers for notification of a deleted resource.
|
void |
registerForDeletedResources()
Registers for notification of deleted resources.
|
void |
registerForNewResources()
Register for notifications of new resources.
|
void |
useFederatedBinView()
Federates the view for methods in this session.
|
void |
useIsolatedBinView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getBinId()
Bin Id associated with this
session. Bin Id associated with this sessionmandatory - This method must be implemented. Bin getBin() throws OperationFailedException, PermissionDeniedException
Bin associated with this session. Bin associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canRegisterForResourceNotifications()
Resource
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 useFederatedBinView()
mandatory - This method is must be implemented. void useIsolatedBinView()
mandatory - This method is must be implemented. void registerForNewResources()
throws OperationFailedException,
PermissionDeniedException
ResourceReceiver.newResources() is invoked when a new
Resource is appears in this bin.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedResources()
throws OperationFailedException,
PermissionDeniedException
ResourceReceiver.changedResources() is invoked when a resource
in this bin is changed.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
ResourceReceiver.changedResources() is invoked when the
specified resource in this bin is changed.resourceId - the Id of the Resource
to monitorNullArgumentException - resourceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedResources()
throws OperationFailedException,
PermissionDeniedException
ResourceReceiver.deletedResources() is invoked when a resource
is deleted or removed from this bin.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
ResourceReceiver.deletedResources() is invoked when the
specified resource is deleted or removed from this bin.resourceId - the Id of the Resource
to monitorNullArgumentException - resourceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.