public interface CompositionNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Composition
objects in this Repository.
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.
Two view are defined in this session:
federateRepositoryView:
includes notifications of
compositions in repositories of which this repository is an ancestor
in the repository hierarchy isolateRepositoryView:
restricts notifications to
this Repository
only Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForCompositionNotifications()
Tests if this user can register for
Composition
notifications. |
Repository |
getRepository()
Gets the
Repository associated with this session. |
Id |
getRepositoryId()
Gets the
Repository Id associated with
this session. |
void |
registerForChangedComposition(Id compositionId)
Registers for notification of an updated composition.
|
void |
registerForChangedCompositions()
Register for notifications of new compositions.
|
void |
registerForDeletedComposition(Id compositionId)
Registers for notification of a deleted composition.
|
void |
registerForDeletedCompositions()
Register for notifications of new compositions.
|
void |
registerForNewCompositions()
Register for notifications of new composition.
|
void |
useFederatedRepositoryView()
Federates the view for composition methods in this session.
|
void |
useIsolatedRepositoryView()
Isolates the view for composition methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getRepositoryId()
Repository
Id
associated with
this session. Repository Id
associated with this sessionmandatory
- This method must be implemented. Repository getRepository() throws OperationFailedException, PermissionDeniedException
Repository
associated with this session. Repository
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForCompositionNotifications()
Composition
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 useFederatedRepositoryView()
mandatory
- This method is must be implemented. void useIsolatedRepositoryView()
mandatory
- This method is must be implemented. void registerForNewCompositions() throws OperationFailedException, PermissionDeniedException
CompositionReceiver.newCompositions()
is invoked when a new
Composition
appears in this repository.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedCompositions() throws OperationFailedException, PermissionDeniedException
CompositionReceiver.changedCompositions()
is invoked when a
Composition
is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedComposition(Id compositionId) throws OperationFailedException, PermissionDeniedException
CompositionReceiver.changedCompositions()
is invoked when the
specified composition is changed.compositionId
- the Id
of the Composition
to monitorNullArgumentException
- compositionId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedCompositions() throws OperationFailedException, PermissionDeniedException
CompositionReceiver.deletedCompositions()
is invoked when a
Composition
is removed from this repository.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedComposition(Id compositionId) throws OperationFailedException, PermissionDeniedException
CompositionReceiver.deletedCompositions()
is invoked when the
specified composition is removed from this repository.compositionId
- the Id
of the Composition
to monitorNullArgumentException
- compositionId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.