Packageorg.spicefactory.lib.command.result
Classpublic class ResultProcessor
InheritanceResultProcessor Inheritance Object

Represents the registration for a single result processor. Use the exists property to determine whether an actual processor had been registered for this particular command or result type.



Public Properties
 PropertyDefined By
  exists : Boolean
[read-only] Indicates whether any command type of factory has been specified for this result processor registration.
ResultProcessor
Public Methods
 MethodDefined By
  
newInstance():Object
Creates a new instance of the result processor.
ResultProcessor
  
processorFactory(factory:Function):void
Specifies the factory to use whenever a new processor must be created for a matching result.
ResultProcessor
  
processorType(type:Class):void
Specified the type of command to instantiate and use as a result processor for each matching result.
ResultProcessor
  
supports(result:Object):Boolean
Indicates whether this result processor can handle the specified result.
ResultProcessor
Property Detail
existsproperty
exists:Boolean  [read-only]

Indicates whether any command type of factory has been specified for this result processor registration.


Implementation
    public function get exists():Boolean
Method Detail
newInstance()method
public function newInstance():Object

Creates a new instance of the result processor.

Returns
Object — a new instance of the result processor
processorFactory()method 
public function processorFactory(factory:Function):void

Specifies the factory to use whenever a new processor must be created for a matching result. The function must not expect any parameter (the actual result can get passed to the execute method of the new instance).

Parameters

factory:Function — the factory to use whenever a new processor must be created for a matching result

processorType()method 
public function processorType(type:Class):void

Specified the type of command to instantiate and use as a result processor for each matching result. Instances of this type must be a command that can get executed through calling Commands.wrap(instance).execute().

Parameters

type:Class — the type of command to instantiate and use as a result processor for each matching result

supports()method 
public function supports(result:Object):Boolean

Indicates whether this result processor can handle the specified result.

Parameters

result:Object — the result produced by a command

Returns
Boolean — true when this result processor can handle the specified result