Packageorg.spicefactory.parsley.util
Classpublic class ContextCallbacks
InheritanceContextCallbacks Inheritance Object

Utility class providing callbacks for various Context initialization states without the need to check whether the Context already initialized synchronously.



Public Methods
 MethodDefined By
  
cancel():void
Discards all callbacks registered with this instance.
ContextCallbacks
  
configured(handler:Function):ContextCallbacks
The handler to invoke when the Context fires its configured event or immediately in case the Context is already configured.
ContextCallbacks
  
error(handler:Function):ContextCallbacks
The handler to invoke when the Context creation aborts with an error.
ContextCallbacks
  
[static]
ContextCallbacks
  
initialized(handler:Function):ContextCallbacks
The handler to invoke when the Context fires its initialized event or immediately in case the Context is already initialized.
ContextCallbacks
Method Detail
cancel()method
public function cancel():void

Discards all callbacks registered with this instance.

configured()method 
public function configured(handler:Function):ContextCallbacks

The handler to invoke when the Context fires its configured event or immediately in case the Context is already configured.

Parameters

handler:Function — the handler to invoke when the Context is configured

Returns
ContextCallbacks — this instance for method chaining
error()method 
public function error(handler:Function):ContextCallbacks

The handler to invoke when the Context creation aborts with an error.

Parameters

handler:Function — the handler to invoke when the Context creation aborts with an error

Returns
ContextCallbacks — this instance for method chaining
forContext()method 
public static function forContext(context:Context):ContextCallbacks

Parameters

context:Context

Returns
ContextCallbacks
initialized()method 
public function initialized(handler:Function):ContextCallbacks

The handler to invoke when the Context fires its initialized event or immediately in case the Context is already initialized.

Parameters

handler:Function — the handler to invoke when the Context is initialized

Returns
ContextCallbacks — this instance for method chaining