Packageorg.springextensions.actionscript.core.operation
SVN browsingIOperation.as
FisheyeIOperation.as
Interfacepublic interface IOperation extends flash.events.IEventDispatcher
SubinterfacesIAsyncCommand, ICompositeCommand, IProgressOperation, ITask
ImplementorsAbstractOperation

The IOperation interface describes an asynchronous operation. It serves as handle for asynchronous executions to which you can attach listeners in order to know when the operation is done executing or when an error occurred during the execution of the operation.

An operation has a result property in case the operation needs to return a result and an error in case an error occurred during the execution of the operation.

Convenience methods are provided to add and remove listeners to the events dispatched by an operation.



Documentation reference: operations


Public Properties
 PropertyDefined by
  error : *
[read-only] The error of this operation or null if no error occurred during this operation.
IOperation
  result : *
[read-only] The result of this operation or null if the operation does not have a result.
IOperation
  timeout : int
The timeout in milliseconds.
IOperation
Public Methods
 MethodDefined by
  
addCompleteListener(listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Convenience method for adding a listener to the OperationEvent.COMPLETE event.
IOperation
  
addErrorListener(listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Convenience method for adding a listener to the OperationEvent.ERROR event.
IOperation
  
addTimeoutListener(listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Convenience method for adding a listener to the OperationEvent.TIMEOUT event.
IOperation
  
removeCompleteListener(listener:Function, useCapture:Boolean = false):void
Convenience method for removing a listener from the OperationEvent.COMPLETE event.
IOperation
  
removeErrorListener(listener:Function, useCapture:Boolean = false):void
Convenience method for removing a listener from the OperationEvent.ERROR event.
IOperation
  
removeTimeoutListener(listener:Function, useCapture:Boolean = false):void
Convenience method for removing a listener from the OperationEvent.TIMEOUT event.
IOperation
Events
 EventSummaryDefined by
   Dispatched when the current IOperation completed successfully.IOperation
   Dispatched when the current IOperation encountered an error.IOperation
   Dispatched when the current IOperation timed out.IOperation
Property detail
errorproperty
error:*  [read-only]

The error of this operation or null if no error occurred during this operation.

Implementation
    public function get error():*
resultproperty 
result:*  [read-only]

The result of this operation or null if the operation does not have a result.

Implementation
    public function get result():*
timeoutproperty 
timeout:int  [read-write]

The timeout in milliseconds. A value less or equal to zero prevents a timeout.

Implementation
    public function get timeout():int
    public function set timeout(value:int):void
Method detail
addCompleteListener()method
public function addCompleteListener(listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

Convenience method for adding a listener to the OperationEvent.COMPLETE event.

Parameters
listener:Function — the event handler function
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
useWeakReference:Boolean (default = false)
addErrorListener()method 
public function addErrorListener(listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

Convenience method for adding a listener to the OperationEvent.ERROR event.

Parameters
listener:Function — the event handler function
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
useWeakReference:Boolean (default = false)
addTimeoutListener()method 
public function addTimeoutListener(listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

Convenience method for adding a listener to the OperationEvent.TIMEOUT event.

Parameters
listener:Function — the event handler function
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
useWeakReference:Boolean (default = false)
removeCompleteListener()method 
public function removeCompleteListener(listener:Function, useCapture:Boolean = false):void

Convenience method for removing a listener from the OperationEvent.COMPLETE event.

Parameters
listener:Function — the event handler function
 
useCapture:Boolean (default = false)
removeErrorListener()method 
public function removeErrorListener(listener:Function, useCapture:Boolean = false):void

Convenience method for removing a listener from the OperationEvent.ERROR event.

Parameters
listener:Function — the event handler function
 
useCapture:Boolean (default = false)
removeTimeoutListener()method 
public function removeTimeoutListener(listener:Function, useCapture:Boolean = false):void

Convenience method for removing a listener from the OperationEvent.TIMEOUT event.

Parameters
listener:Function — the event handler function
 
useCapture:Boolean (default = false)
Event detail
operationCompleteevent 
Event object type: org.springextensions.actionscript.core.operation.OperationEvent

Dispatched when the current IOperation completed successfully.

operationErrorevent  
Event object type: org.springextensions.actionscript.core.operation.OperationEvent

Dispatched when the current IOperation encountered an error.

operationTimeoutevent  
Event object type: org.springextensions.actionscript.core.operation.OperationEvent

Dispatched when the current IOperation timed out.