org.apache.jetspeed.pipeline
Class JetspeedPipeline

java.lang.Object
  extended by org.apache.jetspeed.pipeline.JetspeedPipeline
All Implemented Interfaces:
Pipeline

public class JetspeedPipeline
extends java.lang.Object
implements Pipeline

Flexible implementation of a Pipeline.



Suggested order of valves:

Version:
$Id: JetspeedPipeline.java 516448 2007-03-09 16:25:47Z ate $
Author:
Jason van Zyl, David Sean Taylor

Field Summary
protected  java.lang.String name
          Name of this pipeline.
protected  Valve[] valves
          The set of Valves associated with this Pipeline.
 
Constructor Summary
JetspeedPipeline(java.lang.String name, java.util.List valveList)
          Constructor that provides the descriptor for building the pipeline
 
Method Summary
 void addValve(Valve valve)
          Add a new Valve to the end of the pipeline.
 java.lang.String getName()
          Get the name of this pipeline.
 Valve[] getValves()
          Return the set of all Valves in the pipeline.
 void initialize()
           
 void invoke(RequestContext request)
          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 removeValve(Valve valve)
          Remove the specified Valve from the pipeline, if it is found; otherwise, do nothing.
 void setName(java.lang.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

name

protected java.lang.String name
Name of this pipeline.


valves

protected Valve[] valves
The set of Valves associated with this Pipeline.

Constructor Detail

JetspeedPipeline

public JetspeedPipeline(java.lang.String name,
                        java.util.List valveList)
                 throws java.lang.Exception
Constructor that provides the descriptor for building the pipeline

Throws:
java.lang.Exception
Method Detail

initialize

public void initialize()
                throws PipelineException
Specified by:
initialize in interface Pipeline
Throws:
PipelineException

setName

public void setName(java.lang.String name)
Set the name of this pipeline.

Parameters:
name - Name of this pipeline.

getName

public java.lang.String getName()
Get the name of this pipeline.

Specified by:
getName in interface Pipeline
Returns:
String Name of this pipeline.

addValve

public void addValve(Valve valve)
Description copied from interface: Pipeline

Add a new Valve to the end of the pipeline.

Specified by:
addValve in interface Pipeline
Parameters:
valve - Valve to be added.

getValves

public Valve[] getValves()
Description copied from interface: Pipeline

Return the set of all Valves in the pipeline. If there are no such Valves, a zero-length array is returned.

Specified by:
getValves in interface Pipeline
Returns:
An array of valves.

removeValve

public void removeValve(Valve valve)
Description copied from interface: Pipeline

Remove the specified Valve from the pipeline, if it is found; otherwise, do nothing.

Specified by:
removeValve in interface Pipeline
Parameters:
valve - Valve to be removed.

invoke

public void invoke(RequestContext request)
            throws PipelineException
Description copied from interface: 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.

Specified by:
invoke in interface Pipeline
Throws:
PipelineException


Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.