Interface ResponseNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive notifications on adds/changes
to Responses in this dDstributor . 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
ResponseLookupSession .
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeResponseNotification(Id notificationId) Acknowledge a response notification.booleanTests if this user can register forResponsenotifications.Gets theInquestassociated with this session.Gets theInquestIdassociated with this session.voidregisterForChangedResponse(Id responseId) Registers for notification of an updated response.voidRegisters for notification of updated responses.voidregisterForChangedResponsesForInquiry(Id inquiryId) Registers for notification of updated responses for the given inquiry.voidregisterForChangedResponsesForResponder(Id resourceId) Registers for notification of updated responses for the given responder resource.voidregisterForDeletedResponse(Id responseId) Registers for notification of a deleted response.voidRegisters for notification of deleted responses.voidregisterForDeletedResponsesForInquiry(Id inquiryId) Registers for notification of deleted responses for the given inquiry.voidregisterForDeletedResponsesForResponder(Id resourceId) Registers for notification of deleted responses for the given responder resource.voidRegister for notifications of new responses.voidregisterForNewResponsesForInquiry(Id inquiryId) Register for notifications of new responses for the given inquiry.voidregisterForNewResponsesForResponder(Id resourceId) Register for notifications of new responses for the given resonder resource.voidReliable notifications are desired.voidUnreliable notifications are desired.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getInquestId
Id getInquestId()Gets theInquestIdassociated with this session.- Returns:
- the
Inquest Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getInquest
Gets theInquestassociated with this session.- Returns:
- the inquest
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForResponseNotifications
boolean canRegisterForResponseNotifications()Tests if this user can register forResponsenotifications. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer notification operations.- Returns:
falseif notification methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
reliableResponseNotifications
void reliableResponseNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeResponseNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableResponseNotifications
void unreliableResponseNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeResponseNotification
void acknowledgeResponseNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge a response notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
useFederatedInquestView
void useFederatedInquestView()Federates the view for methods in this session. A federated view will include responses in inquests which are children of this inquest in the inquest hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedInquestView
void useIsolatedInquestView()Isolates the view for methods in this session. An isolated view restricts notifications to this inquest only.- Compliance:
mandatory- This method is must be implemented.
-
registerForNewResponses
Register for notifications of new responses.ResponseReceiver.newResponses()is invoked when a newResponseappears in this inquest.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewResponsesForInquiry
void registerForNewResponsesForInquiry(Id inquiryId) throws OperationFailedException, PermissionDeniedException Register for notifications of new responses for the given inquiry.ResponseReceiver.newResponses()is invoked when a newResponseappears in this inquest.- Parameters:
inquiryId- theIdof the inquiry to monitor- Throws:
NullArgumentException-inquiryId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewResponsesForResponder
void registerForNewResponsesForResponder(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of new responses for the given resonder resource.ResponseReceiver.newResponses()is invoked when a newResponseappears in this inquest.- Parameters:
resourceId- theIdof the resource to monitor- Throws:
NullArgumentException-resourceId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedResponses
Registers for notification of updated responses.ResponseReceiver.changedResponses()is invoked when a response in this inquest is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedResponsesForInquiry
void registerForChangedResponsesForInquiry(Id inquiryId) throws OperationFailedException, PermissionDeniedException Registers for notification of updated responses for the given inquiry.ResponseReceiver.changedResponses()is invoked when a response in this inquest is changed.- Parameters:
inquiryId- theIdof the inquiry to monitor- Throws:
NullArgumentException-inquiryId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedResponsesForResponder
void registerForChangedResponsesForResponder(Id resourceId) throws OperationFailedException, PermissionDeniedException Registers for notification of updated responses for the given responder resource.ResponseReceiver.changedResponses()is invoked when a response in this inquest is changed.- Parameters:
resourceId- theIdof the resource to monitor- Throws:
NullArgumentException-resourceId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedResponse
void registerForChangedResponse(Id responseId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated response.ResponseReceiver.changedResponses()is invoked when the specified response in this inquest is changed.- Parameters:
responseId- theIdof theResponseto monitor- Throws:
NullArgumentException-responseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedResponses
Registers for notification of deleted responses.ResponseReceiver.deletedResponses()is invoked when a response is deleted or removed from this inquest.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedResponsesForInquiry
void registerForDeletedResponsesForInquiry(Id inquiryId) throws OperationFailedException, PermissionDeniedException Registers for notification of deleted responses for the given inquiry.ResponseReceiver.deletedResponses()is invoked when a response is deleted or removed from this inquest.- Parameters:
inquiryId- theIdof the inquiry to monitor- Throws:
NullArgumentException-inquiryId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedResponsesForResponder
void registerForDeletedResponsesForResponder(Id resourceId) throws OperationFailedException, PermissionDeniedException Registers for notification of deleted responses for the given responder resource.ResponseReceiver.deletedResponses()is invoked when a response is deleted or removed from this inquest.- Parameters:
resourceId- theIdof the resource to monitor- Throws:
NullArgumentException-resourceId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedResponse
void registerForDeletedResponse(Id responseId) throws OperationFailedException, PermissionDeniedException Registers for notification of a deleted response.ResponseReceiver.deletedResponses()is invoked when the specified response is deleted or removed from this inquest.- Parameters:
responseId- theIdof theResponseto monitor- Throws:
NullArgumentException-responseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-