Interface ProcedureNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ProcedureNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to Procedure 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.

  • Method Details

    • getCookbookId

      Id getCookbookId()
      Gets the Cookbook Id associated with this session.
      Returns:
      the Cookbook Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCookbook

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

      boolean canRegisterForProcedureNotifications()
      Tests if this user can register for Procedure 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.
    • useFederatedCookbookView

      void useFederatedCookbookView()
      Federates the view for methods in this session. A federated view will include procedures in cookbooks which are children of this cookbook in the cookbook hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedCookbookView

      void useIsolatedCookbookView()
      Isolates the view for methods in this session. An isolated view restricts retrievals to this cookbook only.
      Compliance:
      mandatory - This method is must be implemented.
    • reliableProcedureNotifications

      void reliableProcedureNotifications()
      Reliable notifications are desired. In reliable mode, notifications are to be acknowledged using acknowledgeProcedureNotification() .
      Compliance:
      mandatory - This method is must be implemented.
    • unreliableProcedureNotifications

      void unreliableProcedureNotifications()
      Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.
      Compliance:
      mandatory - This method is must be implemented.
    • acknowledgeProcedureNotification

      void acknowledgeProcedureNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
      Acknowledge a procedure notification.
      Parameters:
      notificationId - the Id of the notification
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewProcedures

      void registerForNewProcedures() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new procedures. ProcedureReceiver.newProcedures() is invoked when a new Procedure is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedProcedures

      void registerForChangedProcedures() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated procedures. ProcedureReceiver.changedProcedures() is invoked when a procedure is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedProcedure

      void registerForChangedProcedure(Id procedureId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated procedure. ProcedureReceiver.changedProcedures() is invoked when the specified procedure is changed.
      Parameters:
      procedureId - the Id of the Procedure to monitor
      Throws:
      NullArgumentException - procedureId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedProcedures

      void registerForDeletedProcedures() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted procedures. ProcedureReceiver.deletedProcedures() is invoked when a procedure is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedProcedure

      void registerForDeletedProcedure(Id procedureId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted procedure. ProcedureReceiver.deletedProcedures() is invoked when the specified procedure is deleted.
      Parameters:
      procedureId - the Id of the Procedure to monitor
      Throws:
      NullArgumentException - procedureId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.