Interface InstallationNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface InstallationNotificationSession extends OsidSession

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

    • getSiteId

      Id getSiteId()
      Gets the Site Id associated with this session.
      Returns:
      the Site Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getSite

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

      boolean canRegisterForInstallationNotifications()
      Tests if this user can register for Installation 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 not offer notification functions to unauthorized users.
      Returns:
      false if notification methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • reliableInstallationNotifications

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

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

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

      void registerForNewInstallations() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new installations. InstallationReceiver.newInstallations() is invoked when a new installation is installed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedInstallations

      void registerForDeletedInstallations() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted installations. InstallationReceiver.deletedInstallations() is invoked when an installation is removed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedInstallation

      void registerForDeletedInstallation(Id installationId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted installation. InstallationReceiver.deletedInstallations() is invoked when the specified installation is removed.
      Parameters:
      installationId - the Id of the Installation to monitor
      Throws:
      NullArgumentException - installationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.