Package | org.spicefactory.parsley.messaging.processor |
Class | public class MessageReceiverProcessor |
Inheritance | MessageReceiverProcessor Object |
Implements | StatefulProcessor, SingletonPreProcessor |
Subclasses | MethodReceiverProcessor, PropertyReceiverProcessor |
Property | Defined By | ||
---|---|---|---|
receiverFactory : Function
The factory to invoke for creating new receiver instances. | MessageReceiverProcessor | ||
scopeName : String
The name of the scope the receiver should get registered in. | MessageReceiverProcessor |
Method | Defined By | ||
---|---|---|---|
MessageReceiverProcessor(factory:Function, scopeName:String)
Creates a new processor factory. | MessageReceiverProcessor | ||
Creates a clone of this processor by omitting all
internal state that is tied to one particular target instance. | MessageReceiverProcessor | ||
destroy(target:ManagedObject):void
Invoked when the target instance gets removed from the Context. | MessageReceiverProcessor | ||
destroyBeforeInit(definition:SingletonObjectDefinition):void
Invoked when the Context gets destroyed before the target instance
gets initialized. | MessageReceiverProcessor | ||
init(target:ManagedObject):void
Invoked during initialization of the target instance. | MessageReceiverProcessor | ||
preProcess(definition:SingletonObjectDefinition):void
Allows the preprocessing of the specified object definition even
before the target instance has been created. | MessageReceiverProcessor |
Method | Defined By | ||
---|---|---|---|
Prepares the receiver, primarily passing the ObjectProvider and potentially
the target member information (e.g. | MessageReceiverProcessor |
receiverFactory | property |
protected var receiverFactory:Function
The factory to invoke for creating new receiver instances.
scopeName | property |
protected var scopeName:String
The name of the scope the receiver should get registered in.
MessageReceiverProcessor | () | Constructor |
public function MessageReceiverProcessor(factory:Function, scopeName:String)
Creates a new processor factory.
Parametersfactory:Function — the factory that produces new MessageReceiver instances for each target object
| |
scopeName:String — the name of the scope the receivers listen to
|
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.
ReturnsStatefulProcessor — 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
|
prepareReceiver | () | method |
protected function prepareReceiver(receiver:MessageReceiver, provider:ObjectProvider):void
Prepares the receiver, primarily passing the ObjectProvider and potentially the target member information (e.g. Property or Method).
Parameters
receiver:MessageReceiver — the new receiver to configure
| |
provider:ObjectProvider — the target provider that has been created for the receiver
|
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
|