|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RoutingComponent
Simple interface for using external routing services. A class implementing this interface can either be providing routes synchronously or asynchronously. It is not required to implement both ways, in that case, a UnsupportedOperationException is thrown.
Field Summary | |
---|---|
static int |
ERROR_NO_ROUTE_FOUND
Error message indicating the service could not find a route |
static int |
ERROR_SERVICE_DOWN
Error message indicating the routing service is not responding |
static int |
ERROR_UNKNOWN_DESTINATION
Error message indication the destination point was not found |
static int |
ERROR_UNKNOWN_START
Error message indicating the starting point was not found |
Method Summary | |
---|---|
void |
calculateRoute(RoutingListener l,
GeoCoordinate from,
GeoCoordinate to)
Calls the routing service asynchronously to receive a route between two points. |
void |
calculateRoute(RoutingListener l,
GeoCoordinate from,
GeoCoordinate to,
GeoCoordinate... via)
Calls the routing service asynchronously to receive a route between two points. |
RoutePoint[] |
findRoute(GeoCoordinate from,
GeoCoordinate to)
Calls the routing service synchronously to receive a route between two points. |
RoutePoint[] |
findRoute(GeoCoordinate from,
GeoCoordinate to,
GeoCoordinate... via)
Calls the routing service synchronously to receive a route between two points. |
Field Detail |
---|
static final int ERROR_SERVICE_DOWN
static final int ERROR_UNKNOWN_START
static final int ERROR_UNKNOWN_DESTINATION
static final int ERROR_NO_ROUTE_FOUND
Method Detail |
---|
RoutePoint[] findRoute(GeoCoordinate from, GeoCoordinate to) throws java.lang.UnsupportedOperationException
from
- starting point as GeoCoordinateto
- target as GeoCoordinate
java.lang.UnsupportedOperationException
- if a synchronous call is not supportedRoutePoint[] findRoute(GeoCoordinate from, GeoCoordinate to, GeoCoordinate... via) throws java.lang.UnsupportedOperationException
from
- starting point as GeoCoordinateto
- target as GeoCoordinatevia
- a (possibly empty) set of vias for the route in correct order
java.lang.UnsupportedOperationException
- if a synchronous call is not supportedvoid calculateRoute(RoutingListener l, GeoCoordinate from, GeoCoordinate to) throws java.lang.UnsupportedOperationException
from
- starting point as GeoCoordinateto
- target as GeoCoordinatel
- the listener to be notified
java.lang.UnsupportedOperationException
- if a asynchronous call is not supportedvoid calculateRoute(RoutingListener l, GeoCoordinate from, GeoCoordinate to, GeoCoordinate... via) throws java.lang.UnsupportedOperationException
l
- the listener to be notifiedfrom
- starting point as GeoCoordinateto
- target as GeoCoordinatevia
- a (possibly empty) set of vias for the route in correct order
java.lang.UnsupportedOperationException
- if a asynchronous call is not supported
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |