|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.chain.impl.ChainBase
public class ChainBase
Convenience base class for Chain implementations.
| Field Summary | |
|---|---|
protected Command[] |
commands
The list of Commands configured for this Chain, in
the order in which they may delegate processing to the remainder of
the Chain. |
protected boolean |
frozen
Flag indicating whether the configuration of our commands list has been frozen by a call to the execute() method. |
| Fields inherited from interface org.apache.commons.chain.Command |
|---|
CONTINUE_PROCESSING, PROCESSING_COMPLETE |
| Constructor Summary | |
|---|---|
ChainBase()
Construct a Chain with no configured Commands. |
|
ChainBase(Collection commands)
Construct a Chain configured with the specified
Commands. |
|
ChainBase(Command command)
Construct a Chain configured with the specified
Command. |
|
ChainBase(Command[] commands)
Construct a Chain configured with the specified
Commands. |
|
| Method Summary | |
|---|---|
void |
addCommand(Command command)
See the Chain JavaDoc. |
boolean |
execute(Context context)
See the Chain JavaDoc. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Command[] commands
The list of Commands configured for this Chain, in
the order in which they may delegate processing to the remainder of
the Chain.
protected boolean frozen
Flag indicating whether the configuration of our commands list
has been frozen by a call to the execute() method.
| Constructor Detail |
|---|
public ChainBase()
public ChainBase(Command command)
Construct a Chain configured with the specified
Command.
command - The Command to be configured
IllegalArgumentException - if command
is nullpublic ChainBase(Command[] commands)
Construct a Chain configured with the specified
Commands.
commands - The Commands to be configured
IllegalArgumentException - if commands,
or one of the individual Command elements,
is nullpublic ChainBase(Collection commands)
Construct a Chain configured with the specified
Commands.
commands - The Commands to be configured
IllegalArgumentException - if commands,
or one of the individual Command elements,
is null| Method Detail |
|---|
public void addCommand(Command command)
Chain JavaDoc.
addCommand in interface Chaincommand - The Command to be added
IllegalArgumentException - if command
is null
IllegalStateException - if no further configuration is allowed
public boolean execute(Context context)
throws Exception
Chain JavaDoc.
execute in interface Chainexecute in interface Commandcontext - The Context to be processed by this
Chain
true if the processing of this Context
has been completed, or false if the processing
of this Context should be delegated to a subsequent
Command in an enclosing Chain
Exception - if thrown by one of the Commands
in this Chain but not handled by a postprocess()
method of a Filter
IllegalArgumentException - if context
is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||