Interface org.as2lib.app.exec.Batch

Description

Batch is the definition for a list of processes that will be executed after each other.

Batch allows with addProcess to define a list of processes that will be started after each other. The execution will follow in the order of the arrival.

Batch is a composite (it implements Process), so you can even add one Batch with addProcess to another Batch.

It supports beneath all listeners of Process seperate events for Batch processing: BatchStartListener, BatchFinishListener, BatchUpdateListener and BatchErrorListener

Example: import org.as2lib.app.exec.Batch; import org.as2lib.app.exec.BatchProcess; var b:Batch = new BatchProcess(); b.addListener(new MyStartUpController()); b.addProcess(new MyStartUpProcess()); b.addProcess(new MyXMLParsingProcess()); b.start();

See Also

Method Index

addProcess(), getCurrentProcess(), removeProcess(), removeProcessById()

Inherited from Process

Inherited from EventListenerSource

Inherited from BasicInterface

Method Detail

addProcess

public function addProcess(process:Process):Number

Adds a Process to the list of processes to execute.

Its possible to at the same process more than one times. It will be executed as often as you add it.

Parameters

processProcess to be added

Return

internal identifier of the process

removeProcess

public function removeProcess(process:Process):Void

Removes all instances of a process that were added to the Batch.

Parameters

processProcess to be removed

removeProcessById

public function removeProcessById(id:Number):Void

Removes a Process with a certain id of the Batch.

This is necessary if you add the same process more than once.

Parameters

ididentifier for the certain Process

getCurrentProcess

public function getCurrentProcess(Void):Process

Returns the currently execution Process

Return

currently executing Process