RouteOverviewApi

public final class RouteOverviewApi extends DriverApi

Entry point for the Route Overview API.

Public Method Summary

synchronized static void
clearInstance()
Cleans up instance of the RouteOverviewApi before all references to it are destroyed.
static RouteOverviewApi
createInstance(DriverContext context)
Creates a singleton instance of RouteOverviewApi.
static RouteOverviewApi
getInstance()
Returns the RouteOverviewApi singleton.
VehicleRouteOverview
getVehicleRouteOverview()
Returns an instance of the Vehicle Route Overview, containing the APIs to consume route updates for the given delivery vehicle.

Inherited Method Summary

Public Methods

public static synchronized void clearInstance ()

Cleans up instance of the RouteOverviewApi before all references to it are destroyed. It is the responsibility of the caller to ensure that all such references have been removed.

Furthermore, there is no guarantee that subsequent calls to held references for objects obtained from this RouteOverviewApi instance will continue to work without exceptions.

public static RouteOverviewApi createInstance (DriverContext context)

Creates a singleton instance of RouteOverviewApi. Will throw an error if an instance already exists.

Parameters
context Dependencies needed to initialize the API.
Throws
IllegalStateException if an API instance already exists.
NullPointerException if the context is null.

public static RouteOverviewApi getInstance ()

Returns the RouteOverviewApi singleton.

createInstance(DriverContext) must be called prior to this method, otherwise null will be returned.

public VehicleRouteOverview getVehicleRouteOverview ()

Returns an instance of the Vehicle Route Overview, containing the APIs to consume route updates for the given delivery vehicle.