|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.turbine.pipeline.TurbinePipeline
public class TurbinePipeline
Flexible implementation of a org.apache.turbine.Pipeline
.
Originally based on code from Catalina and ideas from Apache httpd.
Field Summary | |
---|---|
static String |
CLASSIC_PIPELINE
The "Turbine Classic" pipeline. |
protected String |
name
Name of this pipeline. |
protected ThreadLocal<Integer> |
state
The per-thread execution state for processing through this pipeline. |
protected Valve[] |
valves
The set of Valves associated with this Pipeline. |
Constructor Summary | |
---|---|
TurbinePipeline()
|
Method Summary | |
---|---|
void |
addValve(Valve valve)
Add a new Valve to the end of the pipeline. |
String |
getName()
Get the name of this pipeline. |
Valve[] |
getValves()
Return the set of all Valves in the pipeline. |
void |
initialize()
Initializes this instance. |
void |
invoke(PipelineData pipelineData)
Cause the specified request and response to be processed by the sequence of Valves associated with this pipeline, until one of these Valves decides to end the processing. |
void |
invokeNext(PipelineData pipelineData)
Cause the invoke() method of the next Valve
that is part of the Pipeline currently being processed (if any)
to be executed, passing on the specified request and response
objects plus this ValveContext instance. |
void |
removeValve(Valve valve)
Remove the specified Valve from the pipeline, if it is found; otherwise, do nothing. |
void |
setName(String name)
Set the name of this pipeline. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String CLASSIC_PIPELINE
protected String name
protected Valve[] valves
protected ThreadLocal<Integer> state
values
array, or
a subscript equal to values.length
if the basic
Valve is currently being processed.
Constructor Detail |
---|
public TurbinePipeline()
Method Detail |
---|
public void initialize() throws Exception
Pipeline
initialize
in interface Pipeline
Exception
org.apache.turbine.Pipeline#initialize()
public void setName(String name)
name
- Name of this pipeline.public String getName()
public void addValve(Valve valve)
Pipeline
Add a new Valve to the end of the pipeline.
addValve
in interface Pipeline
valve
- Valve to be added.org.apache.turbine.Pipeline#addValve(Valve)
public Valve[] getValves()
Pipeline
getValves
in interface Pipeline
org.apache.turbine.Pipeline#getValves()
public void removeValve(Valve valve)
Pipeline
removeValve
in interface Pipeline
valve
- Valve to be removed.org.apache.turbine.Pipeline#removeValve(Valve)
public void invoke(PipelineData pipelineData) throws TurbineException, IOException
Pipeline
Cause the specified request and response to be processed by the sequence of Valves associated with this pipeline, until one of these Valves decides to end the processing.
The implementation must ensure that multiple simultaneous requests (on different threads) can be processed through the same Pipeline without interfering with each other's control flow.
invoke
in interface Pipeline
pipelineData
- The run-time information, including the servlet
request and response we are processing.
IOException
- an input/output error occurred.
TurbineException
org.apache.turbine.Pipeline#invoke(RunData)
public void invokeNext(PipelineData pipelineData) throws TurbineException, IOException
ValveContext
Cause the invoke()
method of the next Valve
that is part of the Pipeline currently being processed (if any)
to be executed, passing on the specified request and response
objects plus this ValveContext
instance.
Exceptions thrown by a subsequently executed Valve will be
passed on to our caller.
If there are no more Valves to be executed, execution of this method will result in a no op.
invokeNext
in interface ValveContext
pipelineData
- The run-time information, including the servlet
request and response we are processing.
TurbineException
- Thrown by a subsequent Valve.
IOException
- Thrown by a subsequent Valve.org.apache.turbine.ValveContext#invokeNext(RunData)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |