Packageorg.spicefactory.parsley.command
Classpublic class MappedCommandBuilder
InheritanceMappedCommandBuilder Inheritance Object

A builder DSL for mapping commands to messages. This API adds on top of the standalone Spicelib Commands builder APIs the ability to let commands get managed by a Parsley Context during execution and to trigger execution based on a message.



Public Methods
 MethodDefined By
  
The type of message (including subtypes) that should trigger command execution.
MappedCommandBuilder
  
The execution order in relation to other message receivers.
MappedCommandBuilder
  
register(context:Context):void
Registers this mapping with the specified Context.
MappedCommandBuilder
  
The name of the scope in which to listen for messages.
MappedCommandBuilder
  
The optional selector for mapping matching messages.
MappedCommandBuilder
Method Detail
messageType()method
public function messageType(type:Class):MappedCommandBuilder

The type of message (including subtypes) that should trigger command execution.

Parameters

type:Class — the type of message that should trigger command execution

Returns
MappedCommandBuilder — this builder instance for method chaining
order()method 
public function order(order:int):MappedCommandBuilder

The execution order in relation to other message receivers. This order attribute affects all types of message receivers, not only those that execute commands.

Parameters

order:int — the execution order in relation to other message receivers

Returns
MappedCommandBuilder — this builder instance for method chaining
register()method 
public function register(context:Context):void

Registers this mapping with the specified Context.

Parameters

context:Context — the Context this mapping is applied to

scope()method 
public function scope(scope:String):MappedCommandBuilder

The name of the scope in which to listen for messages.

Parameters

scope:String — the name of the scope in which to listen for messages

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

The optional selector for mapping matching messages.

Parameters

selector:* — the selector to use for matching messages

Returns
MappedCommandBuilder — this builder instance for method chaining