Interface PositionNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface PositionNotificationSession extends OsidSession

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

    • getRealmId

      Id getRealmId()
      Gets the Realm Id associated with this session.
      Returns:
      the Realm Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getRealm

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

      boolean canRegisterForPositionNotifications()
      Tests if this user can register for Position 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.
    • useFederatedRealmView

      void useFederatedRealmView()
      Federates the view for methods in this session. A federated view will include notifications for positions in realms which are children of this realm in the realm hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedRealmView

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

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

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

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

      void registerForNewPositions() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new positions. PositionReceiver.newPositions() is invoked when a new Position is appears in this realm.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewPositionsForOrganization

      void registerForNewPositionsForOrganization(Id organizationId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new positions for an organization. PositionReceiver.newPositions() is invoked when a new Position appears in this realm.
      Parameters:
      organizationId - an organization to monitor
      Throws:
      NullArgumentException - organizationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedPositions

      void registerForChangedPositions() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated positions. PositionReceiver.changedPositions() is invoked when a position in this realm is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedPositionsForOrganization

      void registerForChangedPositionsForOrganization(Id organizationId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed positions for the given organization. PositionReceiver.changedPositions() is invoked when a Position for the organization in this realm is changed.
      Parameters:
      organizationId - an organization to monitor
      Throws:
      NullArgumentException - organizationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedPosition

      void registerForChangedPosition(Id positionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Registers for notification of an updated position. PositionReceiver.changedPositions() is invoked when the specified position in this realm is changed.
      Parameters:
      positionId - the Id of the Position to monitor
      Throws:
      NotFoundException - a position was not found identified by the given Id
      NullArgumentException - positionId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedPositions

      void registerForDeletedPositions() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted positions. PositionReceiver.deletedPositions() is invoked when a position is removed from this realm.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedPositionsForOrganization

      void registerForDeletedPositionsForOrganization(Id organizationId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted positions for the given organization. PositionReceiver.deletedPositions() is invoked when a Position for the organization is removed from this realm.
      Parameters:
      organizationId - an organization to monitor
      Throws:
      NullArgumentException - organizationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedPosition

      void registerForDeletedPosition(Id positionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted position. PositionReceiver.deletedPositions() is invoked when the specified position is removed from this realm.
      Parameters:
      positionId - the Id of the Position to monitor
      Throws:
      NotFoundException - a position was not found identified by the given Id
      NullArgumentException - positionId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.