public interface SubjectNotificationSession extends OsidSession
This session defines methods to receive asynchronous notifications on
adds/changes to Subject 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.
The views defined in this session correspond to the views in the
SubjectLookupSession.
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledgeSubjectNotification(Id notificationId)
Acknowledge a subject notification.
|
boolean |
canRegisterForSubjectNotifications()
Tests if this user can register for
Subject
notifications. |
Ontology |
getOntology()
Gets the
Ontology associated with this session. |
Id |
getOntologyId()
Gets the
Ontology Id associated with
this session. |
void |
registerForChangedSubject(Id subjectId)
Registers for notification of an updated subject.
|
void |
registerForChangedSubjectHierarchy()
Registers for notification of an updated subject hierarchy structure.
|
void |
registerForChangedSubjectHierarchyForAncestors(Id subjectId)
Registers for notification of an updated subject hierarchy structure.
|
void |
registerForChangedSubjectHierarchyForDescendants(Id subjectId)
Registers for notification of an updated subject hierarchy structure.
|
void |
registerForChangedSubjects()
Registers for notification of updated subjects.
|
void |
registerForDeletedSubject(Id subjectId)
Registers for notification of a deleted subject.
|
void |
registerForDeletedSubjects()
Registers for notification of deleted subjects.
|
void |
registerForNewSubjects()
Register for notifications of new subjects.
|
void |
reliableSubjectNotifications()
Reliable notifications are desired.
|
void |
unreliableSubjectNotifications()
Unreliable notifications are desired.
|
void |
useFederatedOntologyView()
Federates the view for methods in this session.
|
void |
useIsolatedOntologyView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getOntologyId()
Ontology Id associated with
this session. Ontology Id associated with this sessionmandatory - This method must be implemented. Ontology getOntology() throws OperationFailedException, PermissionDeniedException
Ontology associated with this session. Ontology associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canRegisterForSubjectNotifications()
Subject
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 useFederatedOntologyView()
mandatory - This method is must be implemented. void useIsolatedOntologyView()
mandatory - This method is must be implemented. void reliableSubjectNotifications()
acknowledgeSubjectNotification()
.mandatory - This method is must be implemented. void unreliableSubjectNotifications()
mandatory - This method is must be implemented. void acknowledgeSubjectNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId - the Id of the notificationOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForNewSubjects()
throws OperationFailedException,
PermissionDeniedException
SubjectReceiver.newSubjects() is invoked when a new subject is
created.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedSubjects()
throws OperationFailedException,
PermissionDeniedException
SubjectReceiver.changedSubjects() is invoked when a subject is
changed.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedSubject(Id subjectId) throws OperationFailedException, PermissionDeniedException
SubjectReceiver.changedSubjects() is invoked when the
specified subject is changed.subjectId - the Id of the Subject
to monitorNullArgumentException - subjectId is null
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedSubjects()
throws OperationFailedException,
PermissionDeniedException
SubjectReceiver.deletedSubjects() is invoked when a subject is
removed from this ontology.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedSubject(Id subjectId) throws OperationFailedException, PermissionDeniedException
SubjectReceiver.changedSubjects() is invoked when the
specified subject is removed from this ontology.subjectId - the Id of the Subject
to monitorNullArgumentException - subjectid is null
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedSubjectHierarchy()
throws OperationFailedException,
PermissionDeniedException
SubjectReceiver.changedChildOfSubjects() is invoked
when a node experiences a change in its children.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedSubjectHierarchyForAncestors(Id subjectId) throws OperationFailedException, PermissionDeniedException
SubjectReceiver.changedChildOfSubjects() is invoked
when the specified node or any of its ancestors experiences a change
in its children.subjectId - the Id of the Subject
node to monitorNullArgumentException - subjectId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedSubjectHierarchyForDescendants(Id subjectId) throws OperationFailedException, PermissionDeniedException
SubjectReceiver.changedChildOfSubjects() is invoked
when the specified node or any of its descendants experiences a change
in its children.subjectId - the Id of the Subject
node to monitorNullArgumentException - subjectId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.