Modifier and Type | Field and 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 and Description |
---|
ChainBase()
|
ChainBase(Collection commands)
|
ChainBase(Command command)
|
ChainBase(Command[] commands)
|
Modifier and Type | Method and Description |
---|---|
void |
addCommand(Command command)
See the
Chain JavaDoc. |
boolean |
execute(Context context)
See the
Chain JavaDoc. |
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 configuredIllegalArgumentException
- if command
is null
public ChainBase(Command[] commands)
commands
- The Command
s to be configuredIllegalArgumentException
- if commands
,
or one of the individual Command
elements,
is null
public ChainBase(Collection commands)
commands
- The Command
s to be configuredIllegalArgumentException
- if commands
,
or one of the individual Command
elements,
is null
public void addCommand(Command command)
Chain
JavaDoc.addCommand
in interface Chain
command
- The Command
to be addedIllegalArgumentException
- if command
is null
IllegalStateException
- if no further configuration is allowedpublic boolean execute(Context context) throws Exception
Chain
JavaDoc.execute
in interface Chain
execute
in interface Command
context
- 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 Command
s
in this Chain
but not handled by a postprocess()
method of a Filter
IllegalArgumentException
- if context
is null
Copyright © 2003–2021 The Apache Software Foundation. All rights reserved.