Interface ResourceLocationNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ResourceLocationNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to resources locations in this Map. 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

    • getMapId

      Id getMapId()
      Gets the Map Id associated with this session.
      Returns:
      the Map Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getMap

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

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

      void useFederatedMapView()
      Federates the view for methods in this session. A federated view will include locations in maps which are children of this map in the map hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedMapView

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

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

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

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

      void registerForEnteredLocations() throws OperationFailedException, PermissionDeniedException
      Register for notifications of entered locations for a resource. ResourceLocationReceiver.enteredLocation() is invoked when a resource appears in a new location.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForEnteredLocation

      void registerForEnteredLocation(Id locationId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of an entered location. ResourceLocationReceiver.enteredLocation() is invoked when a resource appears in the specified location.
      Parameters:
      locationId - the Id of the Location to monitor
      Throws:
      NullArgumentException - locationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForEnteredLocationsForResource

      void registerForEnteredLocationsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of entered locations. ResourceLocationReceiver.enteredLocation() is invoked when the specified resource appears in a new location.
      Parameters:
      resourceId - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForEnteredLocationsForResourcesByGenusType

      void registerForEnteredLocationsForResourcesByGenusType(Type resourceGenusType) throws OperationFailedException, PermissionDeniedException
      Register for notifications of entered locations for the given resource genus type. ResourceLocationReceiver.enteredLocation() is invoked when a resource appears in a new location.
      Parameters:
      resourceGenusType - the genus type of the Resource to monitor
      Throws:
      NullArgumentException - resourceGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForExitedLocations

      void registerForExitedLocations() throws OperationFailedException, PermissionDeniedException
      Register for notifications of exited locations for a resource. ResourceLocationReceiver.exitedLocation() is invoked when a resource exits a location.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForExitedLocation

      void registerForExitedLocation(Id locationId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of an exited location. ResourceLocationReceiver.exitedLocation() is invoked when a resource exits the specified location.
      Parameters:
      locationId - the Id of the Location to monitor
      Throws:
      NullArgumentException - locationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForExitedLocationsForResource

      void registerForExitedLocationsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of exited locations. ResourceLocationReceiver.exitedLocation() is invoked when the specified resource exits a location.
      Parameters:
      resourceId - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForExitedLocationsForResourcesByGenusType

      void registerForExitedLocationsForResourcesByGenusType(Type resourceGenusType) throws OperationFailedException, PermissionDeniedException
      Register for notifications of exited locations for the given resource genus type. ResourceLocationReceiver.exitedLocation() is invoked when a resource exits a location.
      Parameters:
      resourceGenusType - the genus type of the Resource to monitor
      Throws:
      NullArgumentException - resourceGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.