Packagecom.esri.bacore.client
Classpublic final class BatchTaskProcessor
InheritanceBatchTaskProcessor Inheritance Object

The BatchTaskProcessor class is responsible for processing a batch task.

A BatchTaskProcessor instance is aggregated with an instance of the batch task. The functions specified in the constructor of the batch task processor should have the following signature:

logError(message : String) : void;

prepareCommand(parameters:BatchTaskParameters, taskProvider:Object):BACommand;

resultHandler(asyncToken:AsyncToken) : void;

The taskProvider parameter of the prepareCommand function is either a task provider function or an object implementing the IBATaskParameters interface.



Public Methods
 MethodDefined By
  
BatchTaskProcessor(batchTask:IEventDispatcher, logError:Function, prepareCommand:Function, resultHandler:Function)
Creates a new instance of the BatchTaskProcessor class.
BatchTaskProcessor
  
execute(parameters:BatchTaskParameters, responder:IResponder = null):AsyncToken
Executes the batch task.
BatchTaskProcessor
Constructor Detail
BatchTaskProcessor()Constructor
public function BatchTaskProcessor(batchTask:IEventDispatcher, logError:Function, prepareCommand:Function, resultHandler:Function)

Creates a new instance of the BatchTaskProcessor class.

Parameters
batchTask:IEventDispatcher — An instance of batch task associated with this processor.
 
logError:Function — An error logging function.
 
prepareCommand:Function — A function preparing a command to be executed.
 
resultHandler:Function — A function processing the batch task result.
Method Detail
execute()method
public function execute(parameters:BatchTaskParameters, responder:IResponder = null):AsyncToken

Executes the batch task.

The responder.fault function is invoked with an instance of the FaultEvent type and the responder.result function is invoked with an instance of the BATaskCompletedEvent type.

Parameters

parameters:BatchTaskParameters — Batch task parameters.
 
responder:IResponder (default = null) — A responder processing events.

Returns
AsyncToken — Async token associated with the batch task.