Package org.apache.commons.chain.impl
Class ChainBase
java.lang.Object
org.apache.commons.chain.impl.ChainBase
Convenience base class for Chain
implementations.
- Version:
- $Revision: 480477 $ $Date: 2006-11-29 08:34:52 +0000 (Wed, 29 Nov 2006) $
- Author:
- Craig R. McClanahan
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Command[]
protected boolean
Flag indicating whether the configuration of our commands list has been frozen by a call to theexecute()
method.Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCommand
(Command command) See theChain
JavaDoc.boolean
See theChain
JavaDoc.(package private) Command[]
-
Field Details
-
commands
-
frozen
protected boolean frozenFlag indicating whether the configuration of our commands list has been frozen by a call to the
execute()
method.
-
-
Constructor Details
-
ChainBase
public ChainBase() -
ChainBase
- Parameters:
command
- TheCommand
to be configured- Throws:
IllegalArgumentException
- ifcommand
isnull
-
ChainBase
- Parameters:
commands
- TheCommand
s to be configured- Throws:
IllegalArgumentException
- ifcommands
, or one of the individualCommand
elements, isnull
-
ChainBase
- Parameters:
commands
- TheCommand
s to be configured- Throws:
IllegalArgumentException
- ifcommands
, or one of the individualCommand
elements, isnull
-
-
Method Details
-
addCommand
See theChain
JavaDoc.- Specified by:
addCommand
in interfaceChain
- Parameters:
command
- TheCommand
to be added- Throws:
IllegalArgumentException
- ifcommand
isnull
IllegalStateException
- if no further configuration is allowed
-
execute
See theChain
JavaDoc.- Specified by:
execute
in interfaceChain
- Specified by:
execute
in interfaceCommand
- Parameters:
context
- TheContext
to be processed by thisChain
- 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
- if thrown by one of theCommand
s in thisChain
but not handled by apostprocess()
method of aFilter
IllegalArgumentException
- ifcontext
isnull
-
getCommands
Command[] getCommands()
-