com.esri.adf.web.ags.tasks
Class RoutingTask

java.lang.Object
  extended by com.esri.adf.web.ags.tasks.RoutingTask
All Implemented Interfaces:
TaskInfoBean, WebContextInitialize, WebContextObserver, Serializable

public class RoutingTask
extends Object
implements WebContextInitialize, WebContextObserver, TaskInfoBean

See Also:
Serialized Form

Constructor Summary
RoutingTask()
           
 
Method Summary
 void addBarrier(MapEvent event)
           
 void addStop(MapEvent event)
           
 void clearBarriers()
           
 void clearRoute()
           
 void clearStops()
           
 void destroy()
           The cleaup chores (such as releasing held resources) of attributes of a WebContext should be performed in this method.
 int getAllowUturn()
           
 LinkedHashMap<Integer,String> getAllowUTurns()
           
 TaskInfo getTaskInfo()
           
 WebContext getWebContext()
           
 void init(WebContext wContext)
           The initialization chores of attributes of a WebContext should be performed in this method.
 boolean isIgnoreInvalidLoc()
           
 void setAllowUturn(int allowUturn)
           
 void setIgnoreInvalidLoc(boolean ignoreInvalidLoc)
           
 void setTaskInfo(TaskInfo info)
           
 void setWebContext(WebContext wContext)
           
 void solve(TaskEvent event)
           
 void update(WebContext context, Object arg)
           This method is called by the WebContext on its registered WebContextObservers when users call the refresh() methods on the context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoutingTask

public RoutingTask()
Method Detail

init

public void init(WebContext wContext)
Description copied from interface: WebContextInitialize

The initialization chores of attributes of a WebContext should be performed in this method.

Typically this method is called by the WebContext when the context itself is initialized. It is important to note that this method is again called by the context when a GISResource is dynamically added to or removed from the context. Classes that implement this method should keep this in mind and adapt the method to react to the callbacks in these circumstances as well.

A WebContext attribute is usable only after this method has been called.

Specified by:
init in interface WebContextInitialize
Parameters:
wContext - WebContext- the WebContext
See Also:
WebContext.init(WebContext), WebContext.addResource(String, GISResource, int), WebContext.removeResource(GISResource)

destroy

public void destroy()
Description copied from interface: WebContextInitialize

The cleaup chores (such as releasing held resources) of attributes of a WebContext should be performed in this method.

Typically this method is called by the WebContext when the context itself is destroyed.

The WebContext attribute is unusable after this method has been called.

Specified by:
destroy in interface WebContextInitialize
See Also:
WebContext.destroy()

update

public void update(WebContext context,
                   Object arg)
Description copied from interface: WebContextObserver

This method is called by the WebContext on its registered WebContextObservers when users call the refresh() methods on the context.

To setup an object to be updated by the context, one needs to use the WebContext.addObserver(WebContextObserver) to register itself with the context. All context attributes are wired up to the WebContext. When users change state on any of the attributes and need to intimate other attributes of the context to react to the change they call either the WebContext.refresh() or WebContext.refresh(Object) methods. The context in turns calls the WebContextObserver.update(WebContext, Object) methods on all its registered observers.

Specified by:
update in interface WebContextObserver
Parameters:
context - the WebContext that has been refreshed
arg - the argument passed to the WebContext's refresh(arg) method
See Also:
WebContext.refresh(Object), WebContext.addObserver(WebContextObserver), WebContext.removeObserver(WebContextObserver)

getWebContext

public WebContext getWebContext()

setWebContext

public void setWebContext(WebContext wContext)

getTaskInfo

public TaskInfo getTaskInfo()
Specified by:
getTaskInfo in interface TaskInfoBean

setTaskInfo

public void setTaskInfo(TaskInfo info)
Specified by:
setTaskInfo in interface TaskInfoBean

getAllowUTurns

public LinkedHashMap<Integer,String> getAllowUTurns()

isIgnoreInvalidLoc

public boolean isIgnoreInvalidLoc()

setIgnoreInvalidLoc

public void setIgnoreInvalidLoc(boolean ignoreInvalidLoc)

getAllowUturn

public int getAllowUturn()

setAllowUturn

public void setAllowUturn(int allowUturn)

addStop

public void addStop(MapEvent event)

addBarrier

public void addBarrier(MapEvent event)

solve

public void solve(TaskEvent event)

clearStops

public void clearStops()

clearBarriers

public void clearBarriers()

clearRoute

public void clearRoute()