Package org.apache.commons.chain.impl
Class AddingCommand
java.lang.Object
org.apache.commons.chain.impl.NonDelegatingCommand
org.apache.commons.chain.impl.AddingCommand
Implementation of
Command that logs its identifier and
and attempts to add a new Command to the Chain. This
should cause an IllegalStateException if the Chain implementation
subclasses ChainBase.- Version:
- $Revision$ $Date$
- Author:
- Craig R. McClanahan
-
Field Summary
Fields inherited from class org.apache.commons.chain.impl.NonDelegatingCommand
idFields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE -
Constructor Summary
ConstructorsConstructorDescriptionAddingCommand(String id, Chain<Context> parent) Construct an instance that will log the specified identifier -
Method Summary
Methods inherited from class org.apache.commons.chain.impl.NonDelegatingCommand
execute, log, setId
-
Constructor Details
-
AddingCommand
public AddingCommand() -
AddingCommand
Construct an instance that will log the specified identifier- Parameters:
id- identifier to log for this Command instanceparent- the parent Chain
-
-
Method Details
-
execute
Execution method for this Command- Parameters:
context- TheContextto be processed by thisCommandchain- the parent Chain- Returns:
trueif the processing of thisContexthas been completed, orfalseif the processing of thisContextshould be delegated to a subsequentCommandin an enclosingChain- Throws:
Exception- general purpose exception return to indicate abnormal terminationIllegalArgumentException- ifcontextisnull
-