org.as2lib.core.BasicInterface +--org.as2lib.app.exec.Process +--org.as2lib.app.exec.Batch
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
.
Additionally to addProcessListener
method of Process you
can add a BatchListener with addBatchListener that allows to
get a more detailed information about the batch execution.
Example:
import org.as2lib.app.exec.Batch;
import org.as2lib.app.exec.BatchProcess;
var b:Batch = new BatchProcess();
b.addBatchListener(new MyStartUpController());
b.addProcess(new MyStartUpProcess());
b.addProcess(new MyXMLParsingProcess());
b.start();
addAllProcessListeners(), addProcessListener(), getAllProcessListeners(), getParentProcess(), getPercentage(), hasFinished(), hasStarted(), isPaused(), isRunning(), removeAllProcessListeners(), removeProcessListener(), setParentProcess(), start()
public function removeProcess(process:Process):Void
Removes all instances of a process that were added to the batch.
process | Process to be removed. |
public function removeProcessById(id:Number):Void
Removes a process with a certain id from the batch.
id | Identifier for the certain process. |
public function getCurrentProcess(Void):Process
Getter for the currently execution Process.
Currently executing process.
public function getAllAddedProcesses(Void):Array
Getter for all added processes.
List of all added processes.
public function removeBatchListener(listener:BatchListener):Void
Removes a certain BatchListener as Observer from the Batch
.
listener | BatchListener to be removed. |
public function removeAllBatchListeners(Void):Void
Removes all added batchlisteners that were added with addBatchListener or addAllBatchListeners.