Packagecom.esri.bao.tasks
Classpublic final class BAOnlineClient
InheritanceBAOnlineClient Inheritance BAClient Inheritance AbstractClient

The BAOnlineClient class is the client class encapsulating a Business Analyst Online HTTP (REST) Service.


Example
The code snippet below shows how to create an instance of this class. To get the example working, specify valid values for username, password and URLs.
 
 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;
 
 

See also

BAOnlineTokenProvider
UserCredentials


Public Properties
 PropertyDefined by
 Inheritedconcurrency : String = "multiple"
Value that indicates how to handle multiple calls to the same task.
AbstractClient
 InheriteddisableClientCaching : 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
 InheritedproxyURL : String
The URL to proxy the request through.
AbstractClient
 InheritedrequestTimeout : Number = -1
The request timeout in seconds.
AbstractClient
 InheritedshowBusyCursor : Boolean = false
If true, a busy cursor is displayed while a service is executing.
AbstractClient
 Inheritedtoken : String
Token for accessing a secure HTTP client.
AbstractClient
 InheritedtokenProvider : ITokenProvider
Provider responsible for updating the security token if the last one expires.
AbstractClient
 Inheritedurl : String
URL of the task.
AbstractClient
Public Methods
 MethodDefined by
  
BAOnlineClient(url:Object = null)
Creates a new instance of the client.
BAOnlineClient
 Inherited
combineUrl(baseUrl:String, urlSuffix:String):String
[static] Combines a base URL with a suffix.
AbstractClient
 Inherited
dispatchEventOnTask(event:Event, asyncToken:AsyncToken):void
[static] Dispatches an event on the requester task associated with the given async token.
AbstractClient
 Inherited
notifyOnError(error:Error, asyncToken:AsyncToken):void
[static] Creates fault event from an error and notifies async token responders using the notifyOnFault method.
AbstractClient
 Inherited
notifyOnFault(fault:*, asyncToken:AsyncToken):void
[static] Notifies async token responders on fault and dispatches the fault event on the requester task.
AbstractClient
 Inherited
notifyOnSuccess(success:*, asyncToken:AsyncToken):void
[static] Notifies async token responders on result and dispatches an event on the requester task.
AbstractClient
 Inherited
send(task:IEventDispatcher, logError:Function, urlSuffix:String, urlVariables:URLVariables, responder:IResponder, operation:Function):AsyncToken
Sends a request to HTTP service.
AbstractClient
Constructor detail
BAOnlineClient()constructor
public function BAOnlineClient(url:Object = null)

Creates a new instance of the client.

The base URL to the Business Analyst Online Web Services looks as follows:

http://{host}:{port}

The {host} and {port} parameters in this URL should be substituted with valid Business Analyst Online 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.

Parameters
url:Object (default = null) — The base URL to the Business Analyst Online Web Services.