| 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 the
execute() method. |
CONTINUE_PROCESSING, PROCESSING_COMPLETE| Constructor | Description |
|---|---|
ChainBase() |
|
ChainBase(java.util.Collection commands) |
|
ChainBase(Command command) |
|
ChainBase(Command[] commands) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addCommand(Command command) |
See the
Chain JavaDoc. |
boolean |
execute(Context context) |
See the
Chain JavaDoc. |
(package private) Command[] |
getCommands() |
protected Command[] commands
protected boolean frozen
Flag indicating whether the configuration of our commands list
has been frozen by a call to the execute() method.
public ChainBase()
public ChainBase(Command command)
command - The Command to be configuredjava.lang.IllegalArgumentException - if command
is nullpublic ChainBase(Command[] commands)
public void addCommand(Command command)
Chain JavaDoc.addCommand in interface Chaincommand - The Command to be addedjava.lang.IllegalArgumentException - if command
is nulljava.lang.IllegalStateException - if no further configuration is allowedpublic boolean execute(Context context) throws java.lang.Exception
Chain JavaDoc.execute in interface Chainexecute in interface Commandcontext - The Context to be processed by this
Chaintrue 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 Chainjava.lang.Exception - if thrown by one of the Commands
in this Chain but not handled by a postprocess()
method of a Filterjava.lang.IllegalArgumentException - if context
is nullCommand[] getCommands()