org.as2lib.core.BasicClass +--org.as2lib.app.exec.BatchProcess
BatchProcess
is a implementation of Batch for a list of
Processes.
A BatchProcess
acts like a row execution of Process
instances. All listed processes will be executed after each other.
As BatchProcess
itself acts like a Process you can use it as a
composite to execute a BatchProcess
within another
BatchProcess
.
new BatchProcess()
public function setParentProcess(p:Process):Void
Setter for the parent process
p | Process to be set as parent |
IllegalArgumentException | if the passed process has the current instance as a parent process (recursion safe). |
public function getParentProcess(Void):Process
Getter for the applied parent process.
Parent process or null if no parent process has been set.
public function getCurrentProcess(Void):Process
Getter for the currently execution process.
Currently processing Process.
public function getAllAddedProcesses(Void):Array
Getter for a list of all added processes with addProcess in form of a array.
Array that contains all processes that has been added.
public function onFinishProcess(info:Process):Void
To be executed if one child process has been finished.
info | Finished Process. |
public function onStartProcess(info:Process):Void
Void implementation of ProcessListener.onStartProcess
info | to the process that has been started. |
public function onPauseProcess(info:Process):Void
Implementation of ProcessListener.onPauseProcess that redirects to internal eventbroadcasting.
info | to the process that has been paused. |
public function onResumeProcess(info:Process):Void
Implementation of ProcessListener.onResumeProcess that redirects to internal eventbroadcasting.
info | to the process that has been resumed. |
public function onProcessError(info:Process, error):Void
Implementation of ProcessListener.onProcessError that redirects to internal eventbroadcasting.
info | to the process that has thrown the error. |
public function onUpdateProcess(info:Process):Void
Implementation of ProcessListener.onUpdateProcess that redirects to internal eventbroadcasting.
info | to the process that got updated. |
public function addProcess(p:Process):Number
Adds a process to the list of processes.
p | Process to be added. |
Internal Id of the process.
public function removeProcess(p:Process):Void
Removes a process from the list of executed processes.
If a process has been added more than one times, it removes all executions.
p | Process to be removed. |
public function removeProcessById(id:Number):Void
Removes a process by its internal id.
addProcess returns the internal id of a added process. This method helps to remove concrete reference to the process.
id | Internal Id of the process. |
public function removeProcessListener(listener:ProcessListener):Void
Removes a ProcessListener as Observer from the process.
listener | ProcessListener to be added. |
public function removeAllProcessListeners(Void):Void
Removes all added Observers.
public function addAllProcessListeners(list:Array):Void
Adds a list
of ProcessListeners as Observer to the process.
list | List of listeners to be added. |
public function getAllProcessListeners(Void):Array
Getter for all added Observers.
List that contains all registered listeners
public function addBatchListener(listener:BatchListener):Void
Adds a BatchListener as Observer to the Batch
.
listener | BatchListener to be added. |
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.
public function addAllBatchListeners(list:Array):Void
public function getAllBatchListeners(Void):Array
Getter for all added listeners in form of a Array
.
Added listeners in form of a array.
public function getPercentage(Void):Number
Getter for the current percentage of execution.
public function hasFinished(Void):Boolean
Returns false if the Batch finished execution.
false if the Batch finished execution.
public function hasStarted(Void):Boolean
Returns true if the Batch has been started and is not finished yet.
Will return false if the batch has been finished
true if the Batch has been started with start