Packageorg.springextensions.actionscript.core.operation
SVN browsingAbstractOperation.as
FisheyeAbstractOperation.as
Classpublic class AbstractOperation
InheritanceAbstractOperation Inheritance flash.events.EventDispatcher
ImplementsIOperation
SubclassesAbstractProgressOperation, AbstractRPC, IfElseBlock, LoadPropertiesOperation, LoadResourceBundleOperation, MockOperation, NetConnectionOperation, PauseCommand, Task

Abstract base class for IOperation implementations.



Documentation reference: operations


Public Properties
 PropertyDefined by
  error : *
The error of this operation or null if no error occurred during this operation.
AbstractOperation
  result : *
The result of this operation or null if the operation does not have a result.
AbstractOperation
  timeout : int
The timeout in milliseconds.
AbstractOperation
Public Methods
 MethodDefined by
  
AbstractOperation(timeoutInMilliseconds:int = 0, autoStartTimeout:Boolean = true)
Creates a new AbstractOperation.
AbstractOperation
  
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
  
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
  
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
  
removeTimeoutListener(listener:Function, useCapture:Boolean = false):void
Convenience method for removing a listener from the OperationEvent.TIMEOUT event.
AbstractOperation
Protected Methods
 MethodDefined by
  
startTimeout():void
AbstractOperation
Events
 EventSummaryDefined by
   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
Property detail
errorproperty
error:*  [read-write]

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

Implementation
    public function get error():*
    public function set error(value:*):void
resultproperty 
result:*  [read-write]

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

Implementation
    public function get result():*
    public function set result(value:*):void
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
Constructor detail
AbstractOperation()constructor
public function AbstractOperation(timeoutInMilliseconds:int = 0, autoStartTimeout:Boolean = true)

Creates a new AbstractOperation.

Parameters
timeoutInMilliseconds:int (default = 0)
 
autoStartTimeout:Boolean (default = true)
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)
dispatchCompleteEvent()method 
public function dispatchCompleteEvent(result:* = null):Boolean

Convenience method for dispatching a OperationEvent.COMPLETE event.

Parameters
result:* (default = null)

Returns
Boolean — true if the event was dispatched; false if not
dispatchErrorEvent()method 
public function dispatchErrorEvent(error:* = null):Boolean

Convenience method for dispatching a OperationEvent.ERROR event.

Parameters
error:* (default = null)

Returns
Boolean — true if the event was dispatched; false if not
dispatchTimeoutEvent()method 
public function dispatchTimeoutEvent():Boolean

Convenience method for dispatching a OperationEvent.TIMEOUT event.

Returns
Boolean — true if the event was dispatched; false if not
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)
startTimeout()method 
protected function startTimeout():void
Event detail
operationCompleteevent 
Event object type: org.springextensions.actionscript.core.operation.OperationEvent

Dispatched when the current AbstractOperation has completed its functionality successfully.

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

Dispatched when the current AbstractOperation encountered an error.

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

Dispatched when the current AbstractOperation timed out.