Packageorg.spicefactory.parsley.dsl.messaging.impl
Classpublic class DefaultMessageHandlerBuilder
InheritanceDefaultMessageHandlerBuilder Inheritance Object
Implements MessageHandlerBuilder, ObjectDefinitionBuilderPart

Default implementation for the MessageHandlerBuilder interface.



Public Methods
 MethodDefined By
  
apply(target:ObjectDefinition):void
Applies this builder part to the final definition
DefaultMessageHandlerBuilder
  
[static] Creates a new builder for a command.
DefaultMessageHandlerBuilder
  
[static] Creates a new builder for a message handler.
DefaultMessageHandlerBuilder
  
Sets the optional list of names of properties of the message that should be used as method parameters instead passing the message itself as a parameter.
DefaultMessageHandlerBuilder
  
Sets the execution order for this handler.
DefaultMessageHandlerBuilder
  
Sets the name of the scope this handler should be applied to.
DefaultMessageHandlerBuilder
  
Sets an optional selector value to be used in addition to selecting messages by type.
DefaultMessageHandlerBuilder
  
Sets the type of the messages the handler wants to handle.
DefaultMessageHandlerBuilder
Method Detail
apply()method
public function apply(target:ObjectDefinition):void

Applies this builder part to the final definition

Parameters

target:ObjectDefinition — the final definition to apply this part to

forCommand()method 
public static function forCommand(target:Method, config:Configuration):DefaultMessageHandlerBuilder

Creates a new builder for a command.

Parameters

target:Method — the target method to invoke
 
config:Configuration — the configuration for the associated registry

Returns
DefaultMessageHandlerBuilder — a new builder for a command
forMessageHandler()method 
public static function forMessageHandler(target:Method, config:Configuration):DefaultMessageHandlerBuilder

Creates a new builder for a message handler.

Parameters

target:Method — the target method to invoke
 
config:Configuration — the configuration for the associated registry

Returns
DefaultMessageHandlerBuilder — a new builder for a message handler
messageProperties()method 
public function messageProperties(value:Array):MessageHandlerBuilder

Sets the optional list of names of properties of the message that should be used as method parameters instead passing the message itself as a parameter.

Parameters

value:Array — list of names of properties of the message that should be used as method parameters

Returns
MessageHandlerBuilder — this builder for method chaining
order()method 
public function order(value:int):MessageHandlerBuilder

Sets the execution order for this handler. Will be processed in ascending order. The default is int.MAX_VALUE.

Parameters

value:int — the execution order for this handler

Returns
MessageHandlerBuilder — this builder instance for method chaining
scope()method 
public function scope(name:String):MessageHandlerBuilder

Sets the name of the scope this handler should be applied to.

Parameters

name:String — the name of the scope this handler should be applied to

Returns
MessageHandlerBuilder — this builder instance for method chaining
selector()method 
public function selector(value:*):MessageHandlerBuilder

Sets an optional selector value to be used in addition to selecting messages by type.

Parameters

value:* — an optional selector value to be used in addition to selecting messages by type

Returns
MessageHandlerBuilder — this builder instance for method chaining
type()method 
public function type(value:Class):MessageHandlerBuilder

Sets the type of the messages the handler wants to handle.

Parameters

value:Class — the type of the messages the handler wants to handle

Returns
MessageHandlerBuilder — this builder instance for method chaining