Packagecom.esri.baserver.tasks
Classpublic class BAServerClient
InheritanceBAServerClient Inheritance BAClient Inheritance AbstractClient Inheritance Object

The BAServerClient class is the client class encapsulating a Business Analyst Server HTTP (REST) Service.

View the examples



Public Properties
 PropertyDefined By
  activeDatasetID : String = null
Active dataset ID.
BAServerClient
 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
  isFullErrorMessage : Boolean = false
Produce a full error message with stack trace (true) or without stack trace (false).
BAServerClient
 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
  
BAServerClient(url:Object = null)
Creates a new instance of the BAServerClient class.
BAServerClient
 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
notifyOnResult(result:*, 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, timeout:Number = -1, disableCaching:Boolean = false, url:String = null):AsyncToken
Sends a request to HTTP service.
AbstractClient
Property Detail
activeDatasetIDproperty
public var activeDatasetID:String = null

Active dataset ID. Null value means using the default Business Analyst Server dataset which is the first dataset in the dataset list. The value of this variable is used as an initial value of the activeDatasetID property of a task when it is created using the BAServerClient class instance in its constructor.

isFullErrorMessageproperty 
public var isFullErrorMessage:Boolean = false

Produce a full error message with stack trace (true) or without stack trace (false). The value of this variable is used as an initial value of the isFullErrorMessage property of a task when it is created using the BAServerClient class instance in its constructor.

Constructor Detail
BAServerClient()Constructor
public function BAServerClient(url:Object = null)

Creates a new instance of the BAServerClient class.

The base URL to the Business Analyst Server HTTP Service looks as follows:

http://{host}:{port}/ArcGIS/baserver/REST/services/DefaultMap/BAServer

The {host} and {port} parameters in this URL should be substituted with valid Business Analyst Server host name and port, respectively.

Parameters
url:Object (default = null) — Base URL to the Business Analyst Server HTTP Service.
Examples
The code snippet below shows how to create an instance of this class with the assumption that the Business Analyst Server instance uses token-based security. To get the example working, specify valid values for username, password and the URLs.
     var client:BAServerClient = new BAServerClient();
     client.url = "http://localhost/ArcGIS/baserver/REST/services/DefaultMap/BAServer";
     
     // Remove lines below, if the security is disabled. 
     var tokenProvider:ArcGISTokenProvider =
         new ArcGISTokenProvider(new UserCredentials("username", "password"));
     tokenProvider.url = "https://localhost/ArcGIS/tokens";
     
     client.tokenProvider = tokenProvider;