Interface ResponseNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ResponseNotificationSession extends 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 Details

    • getInquestId

      Id getInquestId()
      Gets the Inquest Id associated with this session.
      Returns:
      the Inquest Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getInquest

      Gets the Inquest associated with this session.
      Returns:
      the inquest
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canRegisterForResponseNotifications

      boolean canRegisterForResponseNotifications()
      Tests if this user can register for Response 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.
      Returns:
      false if notification methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • reliableResponseNotifications

      void reliableResponseNotifications()
      Reliable notifications are desired. In reliable mode, notifications are to be acknowledged using acknowledgeResponseNotification() .
      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 - the Id of the notification
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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

      void registerForNewResponses() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new responses. ResponseReceiver.newResponses() is invoked when a new Response appears in this inquest.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 new Response appears in this inquest.
      Parameters:
      inquiryId - the Id of the inquiry to monitor
      Throws:
      NullArgumentException - inquiryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 new Response appears in this inquest.
      Parameters:
      resourceId - the Id of the resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedResponses

      void registerForChangedResponses() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated responses. ResponseReceiver.changedResponses() is invoked when a response in this inquest is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the inquiry to monitor
      Throws:
      NullArgumentException - inquiryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the Response to monitor
      Throws:
      NullArgumentException - responseId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedResponses

      void registerForDeletedResponses() throws OperationFailedException, PermissionDeniedException
      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 request
      PermissionDeniedException - 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 - the Id of the inquiry to monitor
      Throws:
      NullArgumentException - inquiryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the Response to monitor
      Throws:
      NullArgumentException - responseId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.