| Package | org.springextensions.actionscript.core.command |
| SVN browsing | GenericOperationCommand.as |
| Fisheye | GenericOperationCommand.as |
| Class | public class GenericOperationCommand |
| Inheritance | GenericOperationCommand AbstractProgressOperation AbstractOperation flash.events.EventDispatcher |
| Implements | IApplicationDomainAware, IAsyncCommand |
ICommand implementation that can be used to wrap arbitrary IOperation or IProgressOperation
implementations. This way immediate execution of the IOperation can be defered to an instance
of this class.
See also
Documentation reference: genericoperationcommand
| Property | Defined by | ||
|---|---|---|---|
| applicationDomain : ApplicationDomain [write-only]
| GenericOperationCommand | ||
| constructorArguments : Array
An array of arguments that will be passed to the constructor of the specified
IOperation implementation. | GenericOperationCommand | ||
![]() | error : *
The error of this operation or
null if no error occurred during this operation. | AbstractOperation | |
| operationClass : Class [read-only]
The specified
IOperation implementation that will be created when the current GenericOperationCommand is executed. | GenericOperationCommand | ||
![]() | progress : uint
The progress of this operation.
| AbstractProgressOperation | |
![]() | result : *
The result of this operation or
null if the operation does not have a result. | AbstractOperation | |
![]() | timeout : int
The timeout in milliseconds.
| AbstractOperation | |
![]() | total : uint
The total amount of progress this operation should make before being done.
| AbstractProgressOperation | |
| Method | Defined by | ||
|---|---|---|---|
|
GenericOperationCommand(operationClass:Class, ... constructorArgs)
Creates a new
GenericOperationCommand instance. | GenericOperationCommand | ||
![]() |
addCompleteListener(listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Convenience method for adding a listener to the OperationEvent.COMPLETE event.
| AbstractOperation | |
![]() |
addErrorListener(listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Convenience method for adding a listener to the OperationEvent.ERROR event.
| AbstractOperation | |
![]() |
addProgressListener(listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Convenience method for adding a listener to the OperationEvent.PROGRESS event.
| AbstractProgressOperation | |
![]() |
addTimeoutListener(listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Convenience method for adding a listener to the OperationEvent.TIMEOUT event.
| AbstractOperation | |
|
createNew(clazz:Class, constructorArgs:Array):GenericOperationCommand
[static]
| GenericOperationCommand | ||
![]() |
dispatchCompleteEvent(result:* = null):Boolean
Convenience method for dispatching a
OperationEvent.COMPLETE event. | AbstractOperation | |
![]() |
dispatchErrorEvent(error:* = null):Boolean
Convenience method for dispatching a
OperationEvent.ERROR event. | AbstractOperation | |
![]() |
dispatchTimeoutEvent():Boolean
Convenience method for dispatching a
OperationEvent.TIMEOUT event. | AbstractOperation | |
|
execute():*
Creates an instance of the specified
IOperation with the specified constructor arguments. | GenericOperationCommand | ||
![]() |
removeCompleteListener(listener:Function, useCapture:Boolean = false):void
Convenience method for removing a listener from the OperationEvent.COMPLETE event.
| AbstractOperation | |
![]() |
removeErrorListener(listener:Function, useCapture:Boolean = false):void
Convenience method for removing a listener from the OperationEvent.ERROR event.
| AbstractOperation | |
![]() |
removeProgressListener(listener:Function, useCapture:Boolean = false):void
Convenience method for removing a listener from the OperationEvent.PROGRESS event.
| AbstractProgressOperation | |
![]() |
removeTimeoutListener(listener:Function, useCapture:Boolean = false):void
Convenience method for removing a listener from the OperationEvent.TIMEOUT event.
| AbstractOperation | |
| Method | Defined by | ||
|---|---|---|---|
![]() |
dispatchProgressEvent():void
Convenience method for dispatching a
OperationEvent.PROGRESS event. | AbstractProgressOperation | |
|
genericOperationCommandInit(operationClass:Class, constructorArgs:Array = null):void
| GenericOperationCommand | ||
|
operationComplete(event:OperationEvent):void
Event handler for the specified
IOperation's OperationEvent.COMPLETE event. | GenericOperationCommand | ||
|
operationError(event:OperationEvent):void
Event handler for the specified
IOperation's OperationEvent.ERROR event. | GenericOperationCommand | ||
|
operationProgress(event:OperationEvent):void
| GenericOperationCommand | ||
|
removeListeners():void
Removes the complete and error listeners from the
IOperation's instance. | GenericOperationCommand | ||
![]() |
startTimeout():void
| AbstractOperation | |
| applicationDomain | property |
applicationDomain:ApplicationDomain [write-only]Implementation
public function set applicationDomain(value:ApplicationDomain):void
| constructorArguments | property |
constructorArguments:Array [read-write]
An array of arguments that will be passed to the constructor of the specified IOperation implementation.
public function get constructorArguments():Array
public function set constructorArguments(value:Array):void
| operationClass | property |
operationClass:Class [read-only]
The specified IOperation implementation that will be created when the current GenericOperationCommand is executed.
public function get operationClass():Class
| GenericOperationCommand | () | constructor |
public function GenericOperationCommand(operationClass:Class, ... constructorArgs)
Creates a new GenericOperationCommand instance.
operationClass:Class — The specified IOperation implementation that will be created.
|
|
... constructorArgs — An array of arguments that will be passed to the constructor of the specified IOperation implementation.
|
| createNew | () | method |
public static function createNew(clazz:Class, constructorArgs:Array):GenericOperationCommandParameters
clazz:Class |
|
constructorArgs:Array |
GenericOperationCommand |
| execute | () | method |
public function execute():*
Creates an instance of the specified IOperation with the specified constructor arguments.
Adds a complete and error event listener to redispatch the IOperation events through the
current GenericOperationCommand.
* |
| genericOperationCommandInit | () | method |
protected function genericOperationCommandInit(operationClass:Class, constructorArgs:Array = null):voidParameters
operationClass:Class |
|
constructorArgs:Array (default = null) |
| operationComplete | () | method |
protected function operationComplete(event:OperationEvent):void
Event handler for the specified IOperation's OperationEvent.COMPLETE event.
event:OperationEvent |
| operationError | () | method |
protected function operationError(event:OperationEvent):void
Event handler for the specified IOperation's OperationEvent.ERROR event.
event:OperationEvent |
| operationProgress | () | method |
| removeListeners | () | method |
protected function removeListeners():void
Removes the complete and error listeners from the IOperation's instance.