Interface InstructionNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface InstructionNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to Instruction objects in this Engine . 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 InstructionLookupSession .

  • Method Details

    • getEngineId

      Id getEngineId()
      Gets the Engine Id associated with this session.
      Returns:
      the Engine Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getEngine

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

      boolean canRegisterForInstructionNotifications()
      Tests if this user can register for Instruction 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.
    • useFederatedEngineView

      void useFederatedEngineView()
      Federates the view for methods in this session. A federated view will include instructions in engines which are children of this engine in the engine hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedEngineView

      void useIsolatedEngineView()
      Isolates the view for methods in this session. An isolated view restricts notifications to this engine only.
      Compliance:
      mandatory - This method is must be implemented.
    • reliableInstructionNotifications

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

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

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

      void registerForNewInstructions() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new instructions. InstructionReceiver.newInstructions() is invoked when a new Instruction appears in this engine.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewInstructionsForAgenda

      void registerForNewInstructionsForAgenda(Id agendaId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new instructions related to the given agenda. InstructionReceiver.newInstructions() is invoked when a new Instruction appears in this engine.
      Parameters:
      agendaId - the Id of the Agenda to monitor
      Throws:
      NullArgumentException - agendaId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewInstructionsForCheck

      void registerForNewInstructionsForCheck(Id checkId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new instructions related to the given agenda. InstructionReceiver.newInstructions() is invoked when a new Instruction appears in this engine.
      Parameters:
      checkId - the Id of the Check to monitor
      Throws:
      NullArgumentException - checkId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedInstructions

      void registerForChangedInstructions() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated instructions. InstructionReceiver.changedInstructions() is invoked when an instruction in this engine is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedInstructionsForAgenda

      void registerForChangedInstructionsForAgenda(Id agendaId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated instructions related to the given agenda. InstructionReceiver.changedInstructions() is invoked when an instruction related to the agenda in this engine is changed.
      Parameters:
      agendaId - the Id of the Agenda to monitor
      Throws:
      NullArgumentException - agendaId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedInstructionsForCheck

      void registerForChangedInstructionsForCheck(Id checkId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated instructions related to the given check. InstructionReceiver.changedInstructions() is invoked when an instruction related to the check in this engine is changed.
      Parameters:
      checkId - the Id of the Check to monitor
      Throws:
      NullArgumentException - checkId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedInstruction

      void registerForChangedInstruction(Id instructionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Registers for notification of an updated instruction. InstructionReceiver.changedInstructions() is invoked when the specified instruction in this engine is changed.
      Parameters:
      instructionId - the Id of the Instruction to monitor
      Throws:
      NotFoundException - an instruction was not found in this engine identified by the given Id
      NullArgumentException - instructionId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedInstructions

      void registerForDeletedInstructions() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted instructions. InstructionReceiver.deletedInstructions() is invoked when an instruction is deleted or removed from this engine.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedInstructionsForAgenda

      void registerForDeletedInstructionsForAgenda(Id agendaId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted instruction for an agenda. InstructionReceiver.deletedInstructions() is invoked when the related instruction is deleted or removed from this engine.
      Parameters:
      agendaId - the Id of the Agenda to monitor
      Throws:
      NullArgumentException - agendaId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedInstructionsForCheck

      void registerForDeletedInstructionsForCheck(Id checkId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted instruction for a check. InstructionReceiver.deletedInstructions() is invoked when the related instruction is deleted or removed from this engine.
      Parameters:
      checkId - the Id of the Check to monitor
      Throws:
      NullArgumentException - checkId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedInstruction

      void registerForDeletedInstruction(Id instructionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted instruction. InstructionReceiver.deletedInstructions() is invoked when the specified instruction is deleted or removed from this engine.
      Parameters:
      instructionId - the Id of the Instruction to monitor
      Throws:
      NotFoundException - an instruction was not found identified by the given Id
      NullArgumentException - instructionId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.