Package | com.esri.bao.tasks |
Class | public class BAOnlineClient |
Inheritance | BAOnlineClient BAClient AbstractClient Object |
See also
Property | Defined By | ||
---|---|---|---|
activeDatasetID : String = null
Active dataset ID. | BAOnlineClient | ||
concurrency : String = multiple
Value that indicates how to handle multiple calls to the same task. | AbstractClient | ||
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. | AbstractClient | ||
proxyURL : String
The URL to proxy the request through. | AbstractClient | ||
requestTimeout : Number = -1
The request timeout in seconds. | AbstractClient | ||
showBusyCursor : Boolean = false
If true, a busy cursor is displayed while a service is executing. | AbstractClient | ||
token : String
Token for accessing a secure HTTP client. | AbstractClient | ||
tokenProvider : ITokenProvider
Provider responsible for updating the security token if the last one expires. | AbstractClient | ||
url : String
URL of the task. | AbstractClient |
Method | Defined By | ||
---|---|---|---|
BAOnlineClient(url:Object = null)
Creates a new instance of the client. | BAOnlineClient | ||
combineUrl(baseUrl:String, urlSuffix:String):String [static]
Combines a base URL with a suffix. | AbstractClient | ||
dispatchEventOnTask(event:Event, asyncToken:AsyncToken):void [static]
Dispatches an event on the requester task associated with the given async token. | AbstractClient | ||
notifyOnError(error:Error, asyncToken:AsyncToken):void [static]
Creates fault event from an error and notifies async token responders using the
notifyOnFault method. | AbstractClient | ||
notifyOnFault(fault:*, asyncToken:AsyncToken):void [static]
Notifies async token responders on fault and dispatches the fault event on the requester task. | AbstractClient | ||
notifyOnResult(result:*, asyncToken:AsyncToken):void [static]
Notifies async token responders on result and dispatches an event on the requester task. | AbstractClient | ||
send(task:IEventDispatcher, logError:Function, urlSuffix:String, urlVariables:URLVariables, responder:IResponder, operation:Function, timeout:Number = -1, disableCaching:Boolean = false, url:String = null):AsyncToken
Sends a request to HTTP service. | AbstractClient |
Method | Defined By | ||
---|---|---|---|
prepareUrl(baseUrl:String, urlSuffix:String):String [override] | BAOnlineClient |
activeDatasetID | property |
public var activeDatasetID:String = null
Active dataset ID. Null value means using the default Community Analyst dataset.
The value of this variable is used as an initial value of the activeDatasetID
property of a task when it is created using the BAOnlineClient class instance in
its constructor.
BAOnlineClient | () | Constructor |
public function BAOnlineClient(url:Object = null)
Creates a new instance of the client.
The base URL to the Community Analyst Web Services looks as follows:
http://{host}:{port}
The {host}
and {port}
parameters in this URL should be substituted with
valid Community Analyst host name and port, respectively.
If the base URL is null or empty, the "http://baoapi.esri.com" value is assigned as the base URL.
Parametersurl:Object (default = null ) — The base URL to the Community Analyst Web Services.
|
prepareUrl | () | method |
override protected function prepareUrl(baseUrl:String, urlSuffix:String):String
Parameters
baseUrl:String | |
urlSuffix:String |
String |
var tokenProvider:BAOnlineTokenProvider = new BAOnlineTokenProvider(new UserCredentials("username", "password")); // "https://baoapi.esri.com" is the default value for token provider url. //tokenProvider.url = "https://baoapi.esri.com"; var client:BAOnlineClient = new BAOnlineClient(); // "http://baoapi.esri.com" is the default value for BAOnlineClient url. //client.url = "http://baoapi.esri.com"; client.tokenProvider = tokenProvider;