| Package | org.springextensions.actionscript.core.operation |
| SVN browsing | OperationQueue.as |
| Fisheye | OperationQueue.as |
| Class | public class OperationQueue |
| Inheritance | OperationQueue AbstractProgressOperation AbstractOperation flash.events.EventDispatcher |
| Subclasses | LoadPropertiesBatchOperation |
IOperation objects that dispatches an OperationEvent.COMPLETE event when
all operations in the queue have completed (and dispatched a corresponding OperationEvent.COMPLETE
event). Useful for invoking multiple operations and getting informed when all operations are finished without
the need to keep track of each individual instance.
See also
Documentation reference: operation queues
| Property | Defined by | ||
|---|---|---|---|
![]() | error : *
The error of this operation or
null if no error occurred during this operation. | AbstractOperation | |
| name : String [read-only]
The name of the queue, or the generated name if none was passed into the constructor.
| OperationQueue | ||
![]() | 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 | ||
|---|---|---|---|
|
OperationQueue(name:String = "")
Creates a new
OperationQueue instance. | OperationQueue | ||
![]() |
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 | |
|
addOperation(operation:IOperation):Boolean
Adds an operation to the queue.
| OperationQueue | ||
![]() |
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 | |
![]() |
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 | |
![]() |
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 | |
|
toString():String
| OperationQueue | ||
| Method | Defined by | ||
|---|---|---|---|
|
addOperationListeners(operation:IOperation):void
Adds the
operation_completeHandler and operation_errorHandler event handler to
the specified operation instance. | OperationQueue | ||
![]() |
dispatchProgressEvent():void
Convenience method for dispatching a
OperationEvent.PROGRESS event. | AbstractProgressOperation | |
|
operation_completeHandler(event:OperationEvent):void
Handles the completion of an operation in this queue.
| OperationQueue | ||
|
operation_errorHandler(event:OperationEvent):void
Handles an error from an operation in this queue.
| OperationQueue | ||
|
removeOperationListeners(operation:IOperation):void
Removes the
operation_completeHandler and operation_errorHandler event handler from
the specified operation instance. | OperationQueue | ||
![]() |
startTimeout():void
| AbstractOperation | |
| Event | Summary | Defined by | ||
|---|---|---|---|---|
Dispatched when all the operations in the current OperationQueue have received a result. | OperationQueue | |||
![]() |
Dispatched when the current AbstractOperation has new progress information to report. | AbstractProgressOperation | ||
![]() |
Dispatched when the current AbstractOperation has completed its functionality successfully. | AbstractOperation | ||
![]() |
Dispatched when the current AbstractOperation encountered an error. | AbstractOperation | ||
![]() |
Dispatched when the current AbstractOperation timed out. | AbstractOperation | ||
| name | property |
name:String [read-only]The name of the queue, or the generated name if none was passed into the constructor.
Implementation public function get name():String
| OperationQueue | () | constructor |
public function OperationQueue(name:String = "")
Creates a new OperationQueue instance.
name:String (default = "") — the name of the queue; if no name is given, one will be generated.
|
| addOperation | () | method |
public function addOperation(operation:IOperation):BooleanAdds an operation to the queue. The operation will not be added if it was previously added to the queue.
Parametersoperation:IOperation — The IOperation that needs to be added to the current queue.
|
Boolean — true if the operation was added; false if not
|
| addOperationListeners | () | method |
protected function addOperationListeners(operation:IOperation):void
Adds the operation_completeHandler and operation_errorHandler event handler to
the specified operation instance.
operation:IOperation |
| operation_completeHandler | () | method |
protected function operation_completeHandler(event:OperationEvent):void
Handles the completion of an operation in this queue. An OperationEvent.PROGRESS event is
dispatched when more operations are left in the queue, or if all operations are complete an
OperationEvent.COMPLETE is dispatched.
event:OperationEvent — the event of the operation that completed
|
| operation_errorHandler | () | method |
protected function operation_errorHandler(event:OperationEvent):voidHandles an error from an operation in this queue.
Parametersevent:OperationEvent |
| removeOperationListeners | () | method |
protected function removeOperationListeners(operation:IOperation):void
Removes the operation_completeHandler and operation_errorHandler event handler from
the specified operation instance.
operation:IOperation |
| toString | () | method |
public override function toString():StringReturns
String — A String representation of the current OperationQueue.
|
| operationComplete | event |
org.springextensions.actionscript.core.operation.OperationEvent
Dispatched when all the operations in the current OperationQueue have received a result.