Packageorg.spicefactory.lib.command.result
Classpublic class ResultProcessors
InheritanceResultProcessors Inheritance Object

Central registry for all available result processors. A processor must be registered before executing a command that produces a result that should be handled by the processor.

A result processor is a command itself and can be built with any of the available command implementation styles, including light commands. The result itself may get passed to the execute method the same way as data from preceding commands can get passed to a regular command.



Public Methods
 MethodDefined By
  
[static] Returns the result processor registration for the specified command type.
ResultProcessors
  
[static] Returns the result processor registration for the specified result type.
ResultProcessors
  
newProcessor(command:Object, result:Object):CommandProxyBuilder
[static] Returns a new processor for the specified command and result or null if no matching processor was registered.
ResultProcessors
Method Detail
forCommandType()method
public static function forCommandType(type:Class):ResultProcessor

Returns the result processor registration for the specified command type. Such a processor processes all results produced by commands of this type (or any subtype), no matter what the type of the actual result is.

Parameters

type:Class — the type of the command

Returns
ResultProcessor — the registration for the result processor
forResultType()method 
public static function forResultType(type:Class):ResultProcessor

Returns the result processor registration for the specified result type. Such a processor processes all results of this type (or any subtype), no matter what the type of the command that produced the result.

Parameters

type:Class — the type of the result

Returns
ResultProcessor — the registration for the result processor
newProcessor()method 
public static function newProcessor(command:Object, result:Object):CommandProxyBuilder

Returns a new processor for the specified command and result or null if no matching processor was registered.

Parameters

command:Object — the command that produced the result
 
result:Object — the result value

Returns
CommandProxyBuilder — a new processor for the specified command and result or null if no matching processor was registered