Packageorg.spicefactory.parsley.lifecycle.processor
Classpublic class ObserveMethodProcessor
InheritanceObserveMethodProcessor Inheritance Object
Implements MethodProcessor, StatefulProcessor, SingletonPreProcessor

Processor that registers and unregisters observers for the lifecycle of other objects.



Public Methods
 MethodDefined By
  
ObserveMethodProcessor(phase:Phase, objectId:String, scopeName:String)
Creates a new processor factory.
ObserveMethodProcessor
  
Creates a clone of this processor by omitting all internal state that is tied to one particular target instance.
ObserveMethodProcessor
  
destroy(target:ManagedObject):void
Invoked when the target instance gets removed from the Context.
ObserveMethodProcessor
  
Invoked when the Context gets destroyed before the target instance gets initialized.
ObserveMethodProcessor
  
init(target:ManagedObject):void
Invoked during initialization of the target instance.
ObserveMethodProcessor
  
Allows the preprocessing of the specified object definition even before the target instance has been created.
ObserveMethodProcessor
  
targetMethod(method:Method):void
Sets the target method for this processor.
ObserveMethodProcessor
Constructor Detail
ObserveMethodProcessor()Constructor
public function ObserveMethodProcessor(phase:Phase, objectId:String, scopeName:String)

Creates a new processor factory.

Parameters
phase:Phase — the object lifecycle phase to listen for
 
objectId:String — the id of the object to observe
 
scopeName:String — the name of the scope to observe
Method Detail
clone()method
public function clone():StatefulProcessor

Creates a clone of this processor by omitting all internal state that is tied to one particular target instance.

Returns
StatefulProcessor — a clone of this processor
destroy()method 
public function destroy(target:ManagedObject):void

Invoked when the target instance gets removed from the Context. Implementations will usually unregister message receivers, unwatch bindings, remove listeners or perform similar disposal tasks.

Parameters

target:ManagedObject — the target instance that is getting removed from the Context

destroyBeforeInit()method 
public function destroyBeforeInit(definition:SingletonObjectDefinition):void

Invoked when the Context gets destroyed before the target instance gets initialized. This hook allows to perform any necessary cleanup that usually happens in the destroy method which will not get invoked in such a case.

Parameters

definition:SingletonObjectDefinition — the definition of the target singleton instance

init()method 
public function init(target:ManagedObject):void

Invoked during initialization of the target instance. Implementations will usually set properties, registers message receivers or performs similar configuration tasks for the target instance managed by this processor.

Parameters

target:ManagedObject — the target instance that is getting initialized

preProcess()method 
public function preProcess(definition:SingletonObjectDefinition):void

Allows the preprocessing of the specified object definition even before the target instance has been created. This allows to perform tasks like message handler registration early in the Context lifecycle.

Parameters

definition:SingletonObjectDefinition — the definition of the target singleton instance

targetMethod()method 
public function targetMethod(method:Method):void

Sets the target method for this processor.

Parameters

method:Method — the target method for this processor