org.as2lib.core.BasicInterface +--org.as2lib.app.exec.Process
Process
is a definition for all lacy processes like for loading files
having serverside responses or algorithms that take a little longer.
Any Process
implementation can be started with start. Due
to flash ist not possible to allow system processes it is build as Observable
that responses if the process was
started (ProcessListener.onStartProcess),
finished (ProcessListener.onFinishProcess),
paused (ProcessListener.onPauseProcess),
resumed (ProcessListener.onResumeProcess) or if the properties
changed (ProcessListener.onUpdateProcess).
To observe Process
you can add one or more listener to the process
with addProcessListener or addAllProcessListeners.
public function start()
Starts the execution of this process.
result for the start (implementation specific).
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 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 getAllProcessListeners(Void):Array
Getter for all added Observers.
List that contains all registered listeners
public function hasStarted(Void):Boolean
Flag if the process has been started.
true if the process has been started and isn't finish yet else false.
public function hasFinished(Void):Boolean
Flag if the process has been finished.
true if the process has been finished else false
public function isPaused(Void):Boolean
Flag if the process has been paused.
true if the process has been started and has been paused
public function isRunning(Void):Boolean
Flag if the process has been paused.
true if the process has been started and is not paused
public function getPercentage(Void):Number
Getter for the currently executed percentage of the process.
Percentage of execution. Null if percentage was not evaluateable.
public function setParentProcess(process:Process):Void
Possibility to tell the process what parent process started its execution.
process | Process that started the current process.
|
IllegalArgumentException | if the passed-in process has the current process within the parent process list or if the passed-in process is the same process as the current process. |
public function getParentProcess(Void):Process
Getter for the parent process that executed the process.
Parent process if available, else null.