Interface InputNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface InputNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to Inputs in this System . This also includes existing inputs that may appear or disappear due to changes in the System hierarchy, 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 InputLookupSession .

  • Method Details

    • getSystemId

      Id getSystemId()
      Gets the System Id associated with this session.
      Returns:
      the System Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getSystem

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

      boolean canRegisterForInputNotifications()
      Tests if this user can register for Input 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.
    • useFederatedSystemView

      void useFederatedSystemView()
      Federates the view for methods in this session. A federated view will include inputs in systems which are children of this system in the system hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedSystemView

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

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

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

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

      void registerForNewInputs() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new inputs. InputReceiver.newInputs() is invoked when a new Input appears in this system.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewInputsForDevice

      void registerForNewInputsForDevice(Id deviceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new inputs for the given device Id . InputReceiver.newInputs() is invoked when a new Input is created.
      Parameters:
      deviceId - the Id of the device to monitor
      Throws:
      NullArgumentException - deviceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewInputsForController

      void registerForNewInputsForController(Id controllerId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new inputs for the given controller Id . InputReceiver.newInputs() is invoked when a new Input is created.
      Parameters:
      controllerId - the Id of the controller to monitor
      Throws:
      NullArgumentException - controllerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedInputs

      void registerForChangedInputs() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated inputs. InputReceiver.changedInputs() is invoked when an input in this system is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedInputsForDevice

      void registerForChangedInputsForDevice(Id deviceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of updated inputs for the given device Id . InputReceiver.changedInputs() is invoked when an input in this system is changed.
      Parameters:
      deviceId - the Id of the device to monitor
      Throws:
      NullArgumentException - deviceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedInputsForController

      void registerForChangedInputsForController(Id controllerId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of updated inputs for the given controller Id . InputReceiver.changedInputs() is invoked when an input in this system is changed.
      Parameters:
      controllerId - the Id of the controller to monitor
      Throws:
      NullArgumentException - controllerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedInput

      void registerForChangedInput(Id inputId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated input. InputReceiver.changedInput() is invoked when the specified input in this system is changed.
      Parameters:
      inputId - the Id of the Input to monitor
      Throws:
      NullArgumentException - inputId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedInputs

      void registerForDeletedInputs() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted inputs. InputReceiver.deletedInputs() is invoked when an input is deleted or removed from this system.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedInputsForDevice

      void registerForDeletedInputsForDevice(Id deviceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted inputs for the given device Id . InputReceiver.deletedInputs() is invoked when an input in this system is removed or deleted.
      Parameters:
      deviceId - the Id of the device to monitor
      Throws:
      NullArgumentException - deviceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedInputsForController

      void registerForDeletedInputsForController(Id controllerId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted inputs for the given controller Id . InputReceiver.deletedInputs() is invoked when an input in this system is removed or deleted.
      Parameters:
      controllerId - the Id of the controller to monitor
      Throws:
      NullArgumentException - controllerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedInput

      void registerForDeletedInput(Id inputId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted input. InputReceiver.deletedInputs() is invoked when the specified input is deleted or removed from this system.
      Parameters:
      inputId - the Id of the Input to monitor
      Throws:
      NullArgumentException - inputId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.