Package org.apache.commons.chain.impl
Class ChainBase
- java.lang.Object
-
- org.apache.commons.chain.impl.ChainBase
-
-
Field Summary
Fields Modifier and Type Field Description protected Command[]
commands
protected boolean
frozen
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCommand(Command command)
See theChain
JavaDoc.boolean
execute(Context context)
See theChain
JavaDoc.(package private) Command[]
getCommands()
-
-
-
Field Detail
-
commands
protected Command[] commands
-
frozen
protected boolean frozen
Flag indicating whether the configuration of our commands list has been frozen by a call to the
execute()
method.
-
-
Method Detail
-
addCommand
public void addCommand(Command command)
See theChain
JavaDoc.- Specified by:
addCommand
in interfaceChain
- Parameters:
command
- TheCommand
to be added- Throws:
java.lang.IllegalArgumentException
- ifcommand
isnull
java.lang.IllegalStateException
- if no further configuration is allowed
-
execute
public boolean execute(Context context) throws java.lang.Exception
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:
java.lang.Exception
- if thrown by one of theCommand
s in thisChain
but not handled by apostprocess()
method of aFilter
java.lang.IllegalArgumentException
- ifcontext
isnull
-
getCommands
Command[] getCommands()
-
-