Interface ResourceRouteNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ResourceRouteNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to resources on routes 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.
    • canRegisterForResourceRouteNotifications

      boolean canRegisterForResourceRouteNotifications()
      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 opt not to offer notification operations.
      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.
    • reliableResourceRouteNotifications

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

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

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

      void registerForStartedRoutes() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new routes for a resource. ResourceRouteReceiver.startedRoute() is invoked when a resource begins a route.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForStartedRoute

      void registerForStartedRoute(Id routeId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of a started route. ResourceRouteReceiver.startedRoute() is invoked when a resource begins the specified route.
      Parameters:
      routeId - the Id of the Route to monitor
      Throws:
      NullArgumentException - routeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForStartedRoutesByStartingLocation

      void registerForStartedRoutesByStartingLocation(Id locationId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of a started route from the specified location. ResourceRouteReceiver.startedRoute() is invoked when the specified resource begins a route.
      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.
    • registerForStartedRoutesByEndingLocation

      void registerForStartedRoutesByEndingLocation(Id locationId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of a started route to the specified location. ResourceRouteReceiver.startedRoute() is invoked when the specified resource begins a route.
      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.
    • registerForStartedRoutesForResource

      void registerForStartedRoutesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of a started route for the given resource. ResourceRouteReceiver.startedRoute() is invoked when the specified resource begins a route.
      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.
    • registerForStartedRoutesForResourcesByGenusType

      void registerForStartedRoutesForResourcesByGenusType(Type resourceGenusType) throws OperationFailedException, PermissionDeniedException
      Register for notifications of a started route for resources of the given resource genus type. ResourceRouteReceiver.startedRoute() is invoked when the specified resource begins a route.
      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.
    • registerForCompletedRoutes

      void registerForCompletedRoutes() throws OperationFailedException, PermissionDeniedException
      Registers for notification of completed routes. ResourceRouteReceiver.completedRoute() is invoked when a resource completes a route.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForCompletedRoute

      void registerForCompletedRoute(Id routeId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of a completed route. ResourceRouteReceiver.completedRoute() is invoked when a resource completes the specified route.
      Parameters:
      routeId - the Id of the Route to monitor
      Throws:
      NullArgumentException - routeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForCompletedRoutesByStartingLocation

      void registerForCompletedRoutesByStartingLocation(Id locationId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a completed route from the specified starting location. ResourceRouteReceiver.completedRoute() is invoked when the specified resource completes a route.
      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.
    • registerForCompletedRoutesByEndingLocation

      void registerForCompletedRoutesByEndingLocation(Id locationId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a completed route from the specified ending location. ResourceRouteReceiver.completedRoute() is invoked when the specified resource completes a route.
      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.
    • registerForCompletedRoutesForResource

      void registerForCompletedRoutesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a completed route for the given resource. ResourceRouteReceiver.completedRoute() is invoked when the specified resource completes a route.
      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.
    • registerForCompletedRoutesForResourcesByGenusType

      void registerForCompletedRoutesForResourcesByGenusType(Type resourceGenusType) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a completed route for resources of the given resource genus type. ResourceRouteReceiver.completedRoute() is invoked when the specified resource completes a route.
      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.
    • registerForCancelledRoutes

      void registerForCancelledRoutes() throws OperationFailedException, PermissionDeniedException
      Registers for notification of cancelled routes. ResourceRouteReceiver.cancelledRoute() is invoked when a resource cancels a route.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForCancelledRoute

      void registerForCancelledRoute(Id routeId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of a cancelled route. ResourceRouteReceiver.completedRoute() is invoked when a resource cancels the specified route.
      Parameters:
      routeId - the Id of the Route to monitor
      Throws:
      NullArgumentException - routeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForCancelledRoutesByStartingLocation

      void registerForCancelledRoutesByStartingLocation(Id locationId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of cancelled routes from the specified starting location. ResourceRouteReceiver.cancelledRoute() is invoked when a specified resource cancels a route.
      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.
    • registerForCancelledRoutesByEndingLocation

      void registerForCancelledRoutesByEndingLocation(Id locationId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of cancelled routes from the specified ending location. ResourceRouteReceiver.cancelledRoute() is invoked when a specified resource cancels a route.
      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.
    • registerForCancelledRoutesForResource

      void registerForCancelledRoutesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of cancelled routes for the given resource. ResourceRouteReceiver.cancelledRoute() is invoked when a specified resource cancels a route.
      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.
    • registerForCancelledRoutesForResourcesByGenusType

      void registerForCancelledRoutesForResourcesByGenusType(Type resourceGenusType) throws OperationFailedException, PermissionDeniedException
      Registers for notification of cancelled routes for resources of the given resource genus type. ResourceRouteReceiver.cancelledRoute() is invoked when a specified resource cancels a route.
      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.
    • registerForNewRouteSegments

      void registerForNewRouteSegments() throws OperationFailedException, PermissionDeniedException
      Registers for notification of new route segments. ResourceRouteReceiver.newRouteSegment() is invoked when a resource moves on to a new route segment.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewRouteSegment

      void registerForNewRouteSegment(Id routeSegmentId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of new route segments. ResourceRouteReceiver.newRouteSegment() is invoked when a resource moves on to the desigtnated route segment.
      Parameters:
      routeSegmentId - the Id of the RouteSegment to monitor
      Throws:
      NullArgumentException - routeSegmentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewRouteSegmentsForResource

      void registerForNewRouteSegmentsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of new route segments for the given resource. ResourceRouteReceiver.newRouteSegment() is invoked when the specified resource moves on to a new route segment.
      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.
    • registerForNewRouteSegmentsForResourcesByGenusType

      void registerForNewRouteSegmentsForResourcesByGenusType(Type resourceGenusType) throws OperationFailedException, PermissionDeniedException
      Registers for notification of new route segments for resources of the given genus type. ResourceRouteReceiver.newRouteSegment() is invoked when the specified resource moves on to a new route segment.
      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.