Packageorg.spicefactory.parsley.core.lifecycle
Interfacepublic interface ManagedObjectHandler
Implementors DefaultManagedObjectHandler

The handler for a single managed obejct. Allows to control the lifecycle of the managed object, creating, configuring and destroying the target object.



Public Properties
 PropertyDefined By
  processors : Array
[read-only] The processors that configure the target object.
ManagedObjectHandler
  target : ManagedObject
[read-only] The target object controlled by this handler.
ManagedObjectHandler
Public Methods
 MethodDefined By
  
Processes the configuration for the specified object and performs dependency injection, message handler registration or invocation of methods marked with [Init] and similar tasks.
ManagedObjectHandler
  
Instantiates a new instance based on its ObjectDefinition.
ManagedObjectHandler
  
Processes lifecycle listeners for the object before it will be removed from the Context.
ManagedObjectHandler
Property Detail
processorsproperty
processors:Array  [read-only]

The processors that configure the target object. The Array does not get populated until the configureObject method is called.


Implementation
    public function get processors():Array
targetproperty 
target:ManagedObject  [read-only]

The target object controlled by this handler.


Implementation
    public function get target():ManagedObject
Method Detail
configureObject()method
public function configureObject():void

Processes the configuration for the specified object and performs dependency injection, message handler registration or invocation of methods marked with [Init] and similar tasks.

createObject()method 
public function createObject():void

Instantiates a new instance based on its ObjectDefinition. This should not include processing its configuration, like performing dependency injection or message handler registration. To allow bidirectional associations this step is deferred until configureObject is invoked.

destroyObject()method 
public function destroyObject():void

Processes lifecycle listeners for the object before it will be removed from the Context. This includes invoking methods marked with [Destroy].