com.nutiteq.services
Class OpenLSDirections

java.lang.Object
  extended by com.nutiteq.services.OpenLSDirections
All Implemented Interfaces:
ResourceDataWaiter, ResourceRequestor, DirectionsService, Service

public class OpenLSDirections
extends java.lang.Object
implements DirectionsService, ResourceRequestor, ResourceDataWaiter

OpenLS directions service using Nutiteq's backend.


Field Summary
static java.lang.String NUTITEQ_DEFAULT_SERVICE_URL
          Default baseurl for the service.
 
Fields inherited from interface com.nutiteq.services.DirectionsService
ERROR_DESTINATION_ADDRESS_NOT_FOUND, ERROR_FROM_ADDRESS_NOT_FOUND, ERROR_FROM_AND_DESTINATION_ADDRESS_SAME, ERROR_ROUTE_NOT_FOUND, IMAGE_ROUTE_END, IMAGE_ROUTE_LEFT, IMAGE_ROUTE_RIGHT, IMAGE_ROUTE_START, IMAGE_ROUTE_STRAIGHT
 
Constructor Summary
OpenLSDirections(DirectionsWaiter directionsWaiter, java.lang.String baseurl, java.lang.String language, WgsPoint routeStart, WgsPoint routeEnd)
           
 
Method Summary
 void cancel()
          Cancel service execution
 void dataRetrieved(byte[] data)
          Data for resource retrieved
 void execute()
          Performe service action
 int getCachingLevel()
          Define at which level should given resource be cached.
 void notifyError()
          Notify implementing object about retrieval error
 java.lang.String resourcePath()
          Get path to resource.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUTITEQ_DEFAULT_SERVICE_URL

public static final java.lang.String NUTITEQ_DEFAULT_SERVICE_URL
Default baseurl for the service.

See Also:
Constant Field Values
Constructor Detail

OpenLSDirections

public OpenLSDirections(DirectionsWaiter directionsWaiter,
                        java.lang.String baseurl,
                        java.lang.String language,
                        WgsPoint routeStart,
                        WgsPoint routeEnd)
Parameters:
directionsWaiter - object waiting for directions result
baseurl - baseurl for the service
language - used language
routeStart - star point for route (in WGS84)
routeEnd - end point for route (in WGS84)
Method Detail

resourcePath

public java.lang.String resourcePath()
Description copied from interface: ResourceRequestor
Get path to resource. Currently library supports retrieval from network and application jar

Specified by:
resourcePath in interface ResourceRequestor
Returns:
path to resource

dataRetrieved

public void dataRetrieved(byte[] data)
Description copied from interface: ResourceDataWaiter
Data for resource retrieved

Specified by:
dataRetrieved in interface ResourceDataWaiter
Parameters:
data - retrieved data

notifyError

public void notifyError()
Description copied from interface: ResourceRequestor
Notify implementing object about retrieval error

Specified by:
notifyError in interface ResourceRequestor

execute

public void execute()
Description copied from interface: Service
Performe service action

Specified by:
execute in interface Service

cancel

public void cancel()
Description copied from interface: Service
Cancel service execution

Specified by:
cancel in interface Service

getCachingLevel

public int getCachingLevel()
Description copied from interface: ResourceRequestor
Define at which level should given resource be cached. Check Cache

Specified by:
getCachingLevel in interface ResourceRequestor
Returns:
cache level for resource