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
id
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
-
Constructor Summary
ConstructorDescriptionAddingCommand
(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
- TheContext
to be processed by thisCommand
chain
- the parent Chain- Returns:
true
if the processing of thisContext
has been completed, orfalse
if the processing of thisContext
should be delegated to a subsequentCommand
in an enclosingChain
- Throws:
Exception
- general purpose exception return to indicate abnormal terminationIllegalArgumentException
- ifcontext
isnull
-