Packageorg.spicefactory.parsley.messaging
Classpublic class MessageBinding
InheritanceMessageBinding Inheritance Object

API for defining a message binding. This binds the value of a property of a managed object to the property of the last matching message. Matching happens like with all other message receivers based on message type and an optional selector.



Public Methods
 MethodDefined By
  
Applies this configuration to the specified definition builder.
MessageBinding
  
forProperty(property:String):MessageBinding
[static] Creates a new builder for a message binding.
MessageBinding
  
Sets the name of the property of the message type whose value should be bound to the target property.
MessageBinding
  
Sets the execution order for this binding.
MessageBinding
  
scope(name:String):MessageBinding
Sets the name of the scope this binding should be applied to.
MessageBinding
  
Sets an optional selector value to be used in addition to selecting messages by type.
MessageBinding
  
type(value:Class):MessageBinding
Sets the type of the messages the binding wants to handle.
MessageBinding
Method Detail
apply()method
public function apply(builder:ObjectDefinitionBuilder):void

Applies this configuration to the specified definition builder.

Parameters

builder:ObjectDefinitionBuilder — the builder to apply this configuration to

forProperty()method 
public static function forProperty(property:String):MessageBinding

Creates a new builder for a message binding.

Parameters

property:String — the name of the target property which should be bound

Returns
MessageBinding — a new builder for a message binding
messageProperty()method 
public function messageProperty(value:String):MessageBinding

Sets the name of the property of the message type whose value should be bound to the target property.

Parameters

value:String — the name of the property of the message type whose value should be bound to the target property

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

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

Parameters

value:int — the execution order for this binding

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

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

Parameters

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

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

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
MessageBinding — this builder instance for method chaining
type()method 
public function type(value:Class):MessageBinding

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

Parameters

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

Returns
MessageBinding — this builder instance for method chaining