org.apache.catalina.core
public class StandardPipeline extends Object implements Pipeline, Contained, Lifecycle
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 | basic
The basic Valve (if any) associated with this Pipeline. |
protected Container | container
The Container with which this Pipeline is associated. |
protected Valve | first
The first valve associated with this Pipeline. |
protected String | info
Descriptive information about this implementation. |
protected LifecycleSupport | lifecycle
The lifecycle event support for this component. |
protected static StringManager | sm
The string manager for this package. |
protected boolean | started
Has this component been started yet? |
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() |
String | getInfo()
Return descriptive information about this implementation class. |
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.
|
Parameters: container The container we should be associated with
Parameters: listener The listener to add
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.
Parameters: valve Valve to be added
Throws: IllegalArgumentException if this Container refused to accept the specified Valve IllegalArgumentException if the specifie Valve refuses to be associated with this Container IllegalStateException if the specified Valve is already associated with a different Container
Return the Valve instance that has been distinguished as the basic Valve for this Pipeline (if any).
Parameters: listener The listener to remove
setContainer(null)
method
will be called if it implements Contained
.
Parameters: valve Valve to be removed
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.
Parameters: valve Valve to be distinguished as the basic Valve
Parameters: container The new associated container
Throws: LifecycleException if this component detects a fatal error that prevents it from being started
Throws: LifecycleException if this component detects a fatal error that needs to be reported