| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.catalina.core.StandardPipeline
public class StandardPipeline
Standard implementation of a processing Pipeline that will invoke
 a series of Valves that have been configured to be called in order.  This
 implementation can be used for any type of Container.
 IMPLEMENTATION WARNING - This implementation assumes that no
 calls to addValve() or removeValve are allowed
 while a request is currently being processed.  Otherwise, the mechanism
 by which per-thread state is maintained will need to be modified.
| Field Summary | |
|---|---|
| protected  Valve | basicThe basic Valve (if any) associated with this Pipeline. | 
| protected  Container | containerThe Container with which this Pipeline is associated. | 
| protected  Valve | firstThe first valve associated with this Pipeline. | 
| protected  java.lang.String | infoDescriptive information about this implementation. | 
| protected  LifecycleSupport | lifecycleThe lifecycle event support for this component. | 
| protected static StringManager | smThe string manager for this package. | 
| protected  boolean | startedHas this component been started yet? | 
| Fields inherited from interface org.apache.catalina.Lifecycle | 
|---|
| AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT | 
| Constructor Summary | |
|---|---|
| StandardPipeline()Construct a new StandardPipeline instance with no associated Container. | |
| StandardPipeline(Container container)Construct a new StandardPipeline instance that is associated with the specified Container. | |
| Method Summary | |
|---|---|
|  void | addLifecycleListener(LifecycleListener listener)Add a lifecycle event listener to this component. | 
|  void | addValve(Valve valve)Add a new Valve to the end of the pipeline associated with this Container. | 
|  LifecycleListener[] | findLifecycleListeners()Get the lifecycle listeners associated with this lifecycle. | 
|  Valve | getBasic()Return the Valve instance that has been distinguished as the basic Valve for this Pipeline (if any). | 
|  Container | getContainer()Return the Container with which this Pipeline is associated. | 
|  Valve | getFirst()Return the Valve instance that has been distinguished as the basic Valve for this Pipeline (if any). | 
|  java.lang.String | getInfo()Return descriptive information about this implementation class. | 
|  javax.management.ObjectName[] | getValveObjectNames() | 
|  Valve[] | getValves()Return the set of Valves in the pipeline associated with this Container, including the basic Valve (if any). | 
|  void | removeLifecycleListener(LifecycleListener listener)Remove a lifecycle event listener from this component. | 
|  void | removeValve(Valve valve)Remove the specified Valve from the pipeline associated with this Container, if it is found; otherwise, do nothing. | 
|  void | setBasic(Valve valve)Set the Valve instance that has been distinguished as the basic Valve for this Pipeline (if any). | 
|  void | setContainer(Container container)Set the Container with which this Pipeline is associated. | 
|  void | start()Prepare for active use of the public methods of this Component. | 
|  void | stop()Gracefully shut down active use of the public methods of this Component. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected Valve basic
protected Container container
protected java.lang.String info
protected LifecycleSupport lifecycle
protected static StringManager sm
protected boolean started
protected Valve first
| Constructor Detail | 
|---|
public StandardPipeline()
public StandardPipeline(Container container)
container - The container we should be associated with| Method Detail | 
|---|
public java.lang.String getInfo()
public Container getContainer()
getContainer in interface Containedpublic void setContainer(Container container)
setContainer in interface Containedcontainer - The new associated containerpublic void addLifecycleListener(LifecycleListener listener)
addLifecycleListener in interface Lifecyclelistener - The listener to addpublic LifecycleListener[] findLifecycleListeners()
findLifecycleListeners in interface Lifecyclepublic void removeLifecycleListener(LifecycleListener listener)
removeLifecycleListener in interface Lifecyclelistener - The listener to remove
public void start()
           throws LifecycleException
start in interface LifecycleLifecycleException - if this component detects a fatal error
  that prevents it from being started
public void stop()
          throws LifecycleException
stop in interface LifecycleLifecycleException - if this component detects a fatal error
  that needs to be reportedpublic Valve getBasic()
Return the Valve instance that has been distinguished as the basic Valve for this Pipeline (if any).
getBasic in interface Pipelinepublic void setBasic(Valve valve)
Set the Valve instance that has been distinguished as the basic
 Valve for this Pipeline (if any).  Prioer to setting the basic Valve,
 the Valve's setContainer() will be called, if it
 implements Contained, with the owning Container as an
 argument.  The method may throw an IllegalArgumentException
 if this Valve chooses not to be associated with this Container, or
 IllegalStateException if it is already associated with
 a different Container.
setBasic in interface Pipelinevalve - Valve to be distinguished as the basic Valvepublic void addValve(Valve valve)
Add a new Valve to the end of the pipeline associated with this
 Container.  Prior to adding the Valve, the Valve's
 setContainer() method will be called, if it implements
 Contained, with the owning Container as an argument.
 The method may throw an
 IllegalArgumentException if this Valve chooses not to
 be associated with this Container, or IllegalStateException
 if it is already associated with a different Container.
addValve in interface Pipelinevalve - Valve to be added
java.lang.IllegalArgumentException - if this Container refused to
  accept the specified Valve
java.lang.IllegalArgumentException - if the specifie Valve refuses to be
  associated with this Container
java.lang.IllegalStateException - if the specified Valve is already
  associated with a different Containerpublic Valve[] getValves()
getValves in interface Pipelinepublic javax.management.ObjectName[] getValveObjectNames()
public void removeValve(Valve valve)
setContainer(null) method
 will be called if it implements Contained.
removeValve in interface Pipelinevalve - Valve to be removedpublic Valve getFirst()
PipelineReturn the Valve instance that has been distinguished as the basic Valve for this Pipeline (if any).
getFirst in interface Pipeline| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||