Interface RouteNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface RouteNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to Routes in this Map . This also includes existing routes that may appear or disappear due to changes in the Map 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 RouteLookupSession .

  • 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.
    • canRegisterForRouteNotifications

      boolean canRegisterForRouteNotifications()
      Tests if this user can register for Route 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 routes 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.
    • reliableRouteNotifications

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

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

      void acknowledgeRouteNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
      Acknowledge a 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.
    • registerForNewRoutes

      void registerForNewRoutes() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new routes. RouteReceiver.newRoutes() is invoked when a new Route appears in this map.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewRoutesForStartingLocation

      void registerForNewRoutesForStartingLocation(Id startingLocationId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new routes for the given starting location. RouteReceiver.newRoutes() is invoked when a new Route appears in this map.
      Parameters:
      startingLocationId - the Id of the Location to monitor
      Throws:
      NullArgumentException - startingLocationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewRoutesForEndingLocation

      void registerForNewRoutesForEndingLocation(Id endingLocationId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new routes for the given ending location. RouteReceiver.newRoutes() is invoked when a new Route appears in this map.
      Parameters:
      endingLocationId - the Id of the Location to monitor
      Throws:
      NullArgumentException - endingLocationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewRoutesThroughLocation

      void registerForNewRoutesThroughLocation(Id locationId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new routes through the given location. RouteReceiver.newRoutes() is invoked when a new Route appears in this map.
      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.
    • registerForChangedRoutes

      void registerForChangedRoutes() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated routes. RouteReceiver.changedRoutes() is invoked when a route in this map is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedRoutesForStartingLocation

      void registerForChangedRoutesForStartingLocation(Id startingLocationId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of updated routes for the given starting location. RouteReceiver.updatedRoutes() is invoked when a route is changed in this map.
      Parameters:
      startingLocationId - the Id of the Location to monitor
      Throws:
      NullArgumentException - startingLocationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedRoutesForEndingLocation

      void registerForChangedRoutesForEndingLocation(Id endingLocationId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of updated routes for the given ending location. RouteReceiver.changedRoutes() is invoked when a route is changed in this map.
      Parameters:
      endingLocationId - the Id of the Location to monitor
      Throws:
      NullArgumentException - endingLocationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedRoutesThroughLocation

      void registerForChangedRoutesThroughLocation(Id locationId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of updated routes through the given location. RouteReceiver.changedRoutes() is invoked when a route is changed in this map.
      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.
    • registerForChangedRoute

      void registerForChangedRoute(Id routeId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated route. RouteReceiver.changedRoutes() is invoked when the specified route in this map is changed.
      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.
    • registerForDeletedRoutes

      void registerForDeletedRoutes() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted routes. RouteReceiver.deletedRoutes() is invoked when a route is deleted or removed from this map.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedRoutesForStartingLocation

      void registerForDeletedRoutesForStartingLocation(Id startingLocationId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted routes for the given starting location. RouteReceiver.deletedRoutes() is invoked when a route is removed from this map.
      Parameters:
      startingLocationId - the Id of the Location to monitor
      Throws:
      NullArgumentException - startingLocationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedRoutesForEndingLocation

      void registerForDeletedRoutesForEndingLocation(Id endingLocationId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted routes for the given ending location. RouteReceiver.deletedRoutes() is invoked when a route is removed from this map.
      Parameters:
      endingLocationId - the Id of the Location to monitor
      Throws:
      NullArgumentException - endingLocationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedRoutesThroughLocation

      void registerForDeletedRoutesThroughLocation(Id locationId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted routes through the given location. RouteReceiver.deletedRoutes() is invoked when a route is removed from this map.
      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.
    • registerForDeletedRoute

      void registerForDeletedRoute(Id routeId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted route. RouteReceiver.deletedRoutes() is invoked when the specified route is deleted or removed from this map.
      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.