Packageorg.spicefactory.parsley.core.processor
Interfacepublic interface SingletonPreProcessor extends ObjectProcessor
Implementors MessageReceiverProcessor, ObserveMethodProcessor

Interface to be implemented by all object processors that need to do some early setup just after the Context has finished processing its configuration but before any target instance gets created.

This mechanism can be used to set up a message handler proxy for example to ensure that matching messages are received even if the sender gets instantiated before the receiver.

It will be ignored when the processor gets applied to a non-singleton object definition.



Public Methods
 MethodDefined By
 Inherited
destroy(target:ManagedObject):void
Invoked when the target instance gets removed from the Context.
ObjectProcessor
  
Invoked when the Context gets destroyed before the target instance gets initialized.
SingletonPreProcessor
 Inherited
init(target:ManagedObject):void
Invoked during initialization of the target instance.
ObjectProcessor
  
Allows the preprocessing of the specified object definition even before the target instance has been created.
SingletonPreProcessor
Method Detail
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

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