Interface RouteCallback
public interface RouteCallback
Receives the outcome of a routing request. Exactly one method is invoked
per request, always on the Codename One event dispatch thread, so it is
safe to touch the UI directly from either one.
-
Method Summary
Modifier and TypeMethodDescriptionvoidrouteFailed(String message, Throwable error) Reports that no route could be produced -- the network failed, the service rejected the request, or no road connects the points (routing across an ocean by car, for example).voidroutesFound(List routes) Delivers the routes found, best first.
-
Method Details
-
routesFound
Delivers the routes found, best first. The list holds at least oneRouteand only holds more whenRouteRequest.setAlternatives(boolean)asked for alternatives and the backend found some. -
routeFailed
Reports that no route could be produced -- the network failed, the service rejected the request, or no road connects the points (routing across an ocean by car, for example).
Parameters
-
message: a human readable explanation, nevernull -
error: the underlying exception when one was thrown, ornullwhen the failure carried none -- a request rejected before it was sent, or an error status the service answered with.messagestands on its own either way;erroris there for logging and diagnostics.
-
-