Packageorg.spicefactory.parsley.dsl.lifecycle.impl
Classpublic class DefaultLifecycleBuilder
InheritanceDefaultLifecycleBuilder Inheritance Object
Implements LifecycleBuilder

Default implementation of the LifecycleBuilder interface.



Public Methods
 MethodDefined By
  
Creates a new instance.
DefaultLifecycleBuilder
  
Sets this object as asynchronously initializing.
DefaultLifecycleBuilder
  
Sets the instance that will replace (or wrap) the final object definition.
DefaultLifecycleBuilder
  
Sets the object responsible for creating instances from this definition.
DefaultLifecycleBuilder
  
Sets a custom message receiver factory.
DefaultLifecycleBuilder
  
Sets a custom object processor factory.
DefaultLifecycleBuilder
Constructor Detail
DefaultLifecycleBuilder()Constructor
public function DefaultLifecycleBuilder(context:ObjectDefinitionContext)

Creates a new instance.

Parameters
context:ObjectDefinitionContext — the context of the definition to build
Method Detail
asyncInit()method
public function asyncInit():AsyncInitBuilder

Sets this object as asynchronously initializing. Such an object will not be considered as fully initialized before it has thrown its complete event. Only has an effect for singleton definition.

Returns
AsyncInitBuilder — a builder for asynchronous object initialization in case custom event types need to be specified
definitionReplacer()method 
public function definitionReplacer(replacer:ObjectDefinitionReplacer):LifecycleBuilder

Sets the instance that will replace (or wrap) the final object definition. This is an advanced feature. From all the builtin tags only the Factory tag uses this hook.

Parameters

replacer:ObjectDefinitionReplacer — the instance that will replace the final object definition

Returns
LifecycleBuilder — this builder for method chaining
instantiator()method 
public function instantiator(value:ObjectInstantiator):LifecycleBuilder

Sets the object responsible for creating instances from this definition.

Parameters

value:ObjectInstantiator — the object responsible for creating instances from this definition.

Returns
LifecycleBuilder — this builder for method chaining
messageReceiverFactory()method 
public function messageReceiverFactory(factory:MessageReceiverFactory, scope:String = null):LifecycleBuilder

Sets a custom message receiver factory. Such a factory is useful if a target object needs to use a custom way of receiving a message not provided by the builtin implementations of the various message receiver interfaces. The factory will be invoked for each

Parameters

factory:MessageReceiverFactory — a custom message receiver factory to be used for the target definition
 
scope:String (default = null) — the scope the custom receiver will listen to, the default is 'global'

Returns
LifecycleBuilder — this builder for method chaining
processorFactory()method 
public function processorFactory(factory:ObjectProcessorFactory):LifecycleBuilder

Sets a custom object processor factory. The factory creates a new objects processor for each instance produced by the definition created by this builder. The processor in turn will be invoked for the target object's key lifecycle events.

Parameters

factory:ObjectProcessorFactory — a custom object processor factory to be used for the target definition

Returns
LifecycleBuilder — this builder for method chaining