BiAbstractActionThread

This is an abstract class that represents an action thread. Override the methods of this class to invoke your own ActionThread.@remark A BiActionThread can be described as an action instance. It represents exactly one execution and is used to keep track of asynchronous executions.

This class extends BiEventTarget and therefore all methods and fields available for BiEventTarget are also available for BiAbstractActionThread .

Constructor

new BiAbstractActionThread ( oAction )

Parameters

NameTypeOptionalDefaultDescripton
oActionBiActionThe action called.

Properties

NameTypegetsetDescripton
actionObjectcheckedThe action that created this thread.
argumentsArraycheckedArguments for this thread.
asyncBooleancheckedWhether to perform this action thread asynchronously
callerObjectcheckedThe instance that called this action thread.
childrenArraycheckedArray of dependencies(children) of this thread.
completedBooleancheckedcheckedWhether execution of this action thread is completed.
eventTargetObjectcheckedThe Event target that triggered the current chain of execution
eventTypeStringcheckedThe type of the event that triggered the current chain of execution
returnsObjectcheckedcheckedWhat is returned by this action thread.
scopeObjectcheckedThe scope to run the handler function in. I.e. what "this" refers to from inside the function.
threadPreparedBooleancheckedWhether dependencies of this action thread are prepared.

Methods

NameDescription
execTrigger this thread.
preparePrepare thread and it's dependencies. This method must be called before a thread can be executed.
processArgumentsThis method is used by the exec method to process arguments.
processChildrenThis method is used by the exec method to process child actions.
processHandlerThis method is used by the exec method to process handler(s).
processReturnsThis method is used by the exec method to set what should be returned by the action thread.

Events

NameTypeBubblesDescripton
completedBiEventThis event is dispatched when the thread is completed.
execBiEventThis event is dispatched when the thread is executed.

Static Methods

None.

Static Fields

None.

Remarks

None.

Method Details

exec

Trigger this thread.

Syntax

object.exec ( oCaller [ ,oEvent ] )

Parameters

NameTypeOptionalDefaultDescripton
oCallerObjectThe instance that called this action thread.
oEventBiEventcheckedThe (optional) event that triggered this chain of actions.

Return Type

Object

prepare

Prepare thread and it's dependencies. This method must be called before a thread can be executed.

Syntax

object.prepare ( oScope [ ,nType ] )

Parameters

NameTypeOptionalDefaultDescripton
oScopeObjectThe scope this thread will be executed in.
nTypeNumbercheckedThe (optional) type of this thread.

Return Type

void

processArguments

This method is used by the exec method to process arguments.

Syntax

object.processArguments ( )

Parameters

No arguments.

Return Type

void

processChildren

This method is used by the exec method to process child actions.

Syntax

object.processChildren ( )

Parameters

No arguments.

Return Type

void

processHandler

This method is used by the exec method to process handler(s).

Syntax

object.processHandler ( )

Parameters

No arguments.

Return Type

void

processReturns

This method is used by the exec method to set what should be returned by the action thread.

Syntax

object.processReturns ( )

Parameters

No arguments.

Return Type

void