Packageorg.spicefactory.parsley.processor.lifecycle
Classpublic class ObserveMethodProcessorFactory
InheritanceObserveMethodProcessorFactory Inheritance Object
Implements ObjectProcessorFactory

Processor that registers and unregisters observers for the lifecycle of other objects. This implementation adds synchronization features for singleton definitions to make sure that they do not miss lifecycle events in case the observed object is initialized earlier. To accomplish this the processor registers a proxy listener before the actual target object gets created.



Public Methods
 MethodDefined By
  
ObserveMethodProcessorFactory(definition:ObjectDefinition, method:String, phase:ObjectLifecycle, objectId:String, context:Context, scopeName:String)
Creates a new processor factory.
ObserveMethodProcessorFactory
  
Creates a new object processor for the specified target instance.
ObserveMethodProcessorFactory
Constructor Detail
ObserveMethodProcessorFactory()Constructor
public function ObserveMethodProcessorFactory(definition:ObjectDefinition, method:String, phase:ObjectLifecycle, objectId:String, context:Context, scopeName:String)

Creates a new processor factory.

Parameters
definition:ObjectDefinition — the definition for the target object receiving the message
 
method:String — name of the target observer method
 
phase:ObjectLifecycle — the object lifecycle phase to listen for
 
objectId:String — the id of the object to observe
 
context:Context — the Context the receiving object belongs to
 
scopeName:String — the name of the scope to observe
Method Detail
createInstance()method
public function createInstance(target:ManagedObject):ObjectProcessor

Creates a new object processor for the specified target instance.

Parameters

target:ManagedObject — the target object to pass to the processor

Returns
ObjectProcessor — a new object processor for the specified target instance