This page describes an older version, please see latest API at http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/tasks/BaseTask.html.
Packagecom.esri.ags.tasks
Classpublic class BaseTask
InheritanceBaseTask Inheritance flash.events.EventDispatcher
Implements mx.core.IMXMLObject
Subclasses ClosestFacilityTask, DetailsTask, FeatureLayerTask, FindTask, GeometryService, Geoprocessor, IdentifyTask, ImageServiceIdentifyTask, Locator, QueryTask, RouteTask, ServiceAreaTask

Base class to be extended by all tasks.



Public Properties
 PropertyDefined By
  autoNormalize : Boolean
If true, normalizes the geometries across the central meridian.
BaseTask
  concurrency : String
Value that indicates how to handle multiple calls to the same task.
BaseTask
  disableClientCaching : Boolean
If true, adds a timestamp parameter ("_ts") to the REST request to prevent the request from being loaded from the browser's cache.
BaseTask
  method : String
URL request method to use.
BaseTask
  proxyURL : String
The URL to proxy the request through.
BaseTask
  requestTimeout : int
The request timeout in seconds.
BaseTask
  showBusyCursor : Boolean
If true, a busy cursor is displayed while a service is executing.
BaseTask
  token : String
Token for accessing a secure task.
BaseTask
  url : String
URL of the task.
BaseTask
Public Methods
 MethodDefined By
  
BaseTask(url:String = null)
Creates a new BaseTask.
BaseTask
Protected Methods
 MethodDefined By
  
sendURLVariables(urlSuffix:String, urlVariables:URLVariables, responder:IResponder, operation:Function):AsyncToken
Sends an HTTP request.
BaseTask
Property Detail
autoNormalizeproperty
autoNormalize:Boolean

Since : ArcGIS API for Flex 2.3

If true, normalizes the geometries across the central meridian.

The default value is true.

This property can be used as the source for data binding.


Implementation
    public function get autoNormalize():Boolean
    public function set autoNormalize(value:Boolean):void
concurrencyproperty 
concurrency:String

Value that indicates how to handle multiple calls to the same task. The default value is multiple. The following values are permitted:

The default value is multiple.

This property can be used as the source for data binding.


Implementation
    public function get concurrency():String
    public function set concurrency(value:String):void

See also

disableClientCachingproperty 
disableClientCaching:Boolean

If true, adds a timestamp parameter ("_ts") to the REST request to prevent the request from being loaded from the browser's cache.

The default value is false.

This property can be used as the source for data binding.


Implementation
    public function get disableClientCaching():Boolean
    public function set disableClientCaching(value:Boolean):void
methodproperty 
method:String

Since : ArcGIS API for Flex 2.1

URL request method to use. Valid values are either URLRequestMethod.GET or URLRequestMethod.POST. BaseTask will always POST if the URL is longer than 2000 characters or includes a "token" parameter, but using this property you can force a "POST" even for all other cases.

The default value is URLRequestMethod.GET.

This property can be used as the source for data binding.


Implementation
    public function get method():String
    public function set method(value:String):void
proxyURLproperty 
proxyURL:String

The URL to proxy the request through.

This property can be used as the source for data binding.


Implementation
    public function get proxyURL():String
    public function set proxyURL(value:String):void
requestTimeoutproperty 
requestTimeout:int

The request timeout in seconds. A value less than or equal to zero prevents request timeout.

The default value is -1.

This property can be used as the source for data binding.


Implementation
    public function get requestTimeout():int
    public function set requestTimeout(value:int):void
showBusyCursorproperty 
showBusyCursor:Boolean

If true, a busy cursor is displayed while a service is executing.

The default value is false.

This property can be used as the source for data binding.


Implementation
    public function get showBusyCursor():Boolean
    public function set showBusyCursor(value:Boolean):void

See also

tokenproperty 
token:String

Token for accessing a secure task.

This property can be used as the source for data binding.


Implementation
    public function get token():String
    public function set token(value:String):void
urlproperty 
url:String

URL of the task.

This property can be used as the source for data binding.


Implementation
    public function get url():String
    public function set url(value:String):void
Constructor Detail
BaseTask()Constructor
public function BaseTask(url:String = null)

Creates a new BaseTask.

Parameters
url:String (default = null) — [optional] URL of the task.
Method Detail
sendURLVariables()method
protected function sendURLVariables(urlSuffix:String, urlVariables:URLVariables, responder:IResponder, operation:Function):AsyncToken

Since : ArcGIS API for Flex 2.1

Sends an HTTP request.

Parameters

urlSuffix:String — [optional] Appended to the URL, for example, "/query"
 
urlVariables:URLVariables — [optional] The request variables to be sent as URL parameters.
 
responder:IResponder — [optional] Added to the AsyncToken. If there is a HTTP fault or the service returns an error, the responder's fault is called, a fault event is dispatched and the operation is not called.
 
operation:Function — [required] The callback function that is passed the decoded result and the AsyncToken, for example, function handleExecute(decodedObject:Object, asyncToken:AsyncToken):void

Returns
AsyncToken — The AsyncToken that can be returned to the caller so that they can add responders to it.