Packageorg.spicefactory.lib.command.flow
Classpublic class DefaultCommandLink
InheritanceDefaultCommandLink Inheritance Object
Implements CommandLink

The default implementation of the CommandLink interface that consists of a LinkCondition and a LinkAction to perform when the condition is met.



Public Methods
 MethodDefined By
  
Creates a new instance.
DefaultCommandLink
  
link(result:CommandResult, processor:CommandLinkProcessor):void
Invoked after a command in the flow finished executing.
DefaultCommandLink
Constructor Detail
DefaultCommandLink()Constructor
public function DefaultCommandLink(condition:LinkCondition, action:LinkAction)

Creates a new instance.

Parameters
condition:LinkCondition — the condition that must be met for this link to perform its action
 
action:LinkAction — the action to perform when the condition is met
Method Detail
link()method
public function link(result:CommandResult, processor:CommandLinkProcessor):void

Invoked after a command in the flow finished executing. The implementation is supposed to invoke the corresponding action in the specified processor if the specified result matches its conditions. If not the implementation should not invoke anything on the processor in which case the next link for the same command (if available) will get invoked (Chain of Responsiblity Pattern).

Parameters

result:CommandResult — the result the preceding command produced
 
processor:CommandLinkProcessor — the processor that can be used to specify the next action the flow should perform