public class StandardPipeline extends LifecycleBase implements Pipeline
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.Lifecycle.SingleUse| Modifier and Type | Field and Description |
|---|---|
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.
|
AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addValve(Valve valve)
Add a new Valve to the end of the pipeline associated with this
Container.
|
protected void |
destroyInternal()
Sub-classes implement this method to perform any instance destruction
required.
|
void |
findNonAsyncValves(Set<String> result)
Identifies the Valves, if any, in this Pipeline that do not support
async.
|
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() |
ObjectName[] |
getValveObjectNames() |
Valve[] |
getValves()
Return the set of Valves in the pipeline associated with this
Container, including the basic Valve (if any).
|
protected void |
initInternal()
Sub-classes implement this method to perform any instance initialisation
required.
|
boolean |
isAsyncSupported()
Returns true if all the valves in this pipeline support async, false otherwise
|
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.
|
protected void |
startInternal()
Start
Valves) in this pipeline and implement the requirements
of LifecycleBase.startInternal(). |
protected void |
stopInternal()
Stop
Valves) in this pipeline and implement the requirements
of LifecycleBase.stopInternal(). |
String |
toString()
Return a String representation of this component.
|
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stopprotected Valve basic
protected Container container
protected Valve first
public StandardPipeline()
public StandardPipeline(Container container)
container - The container we should be associated withpublic boolean isAsyncSupported()
PipelineisAsyncSupported in interface Pipelinepublic void findNonAsyncValves(Set<String> result)
PipelinefindNonAsyncValves in interface Pipelineresult - The Set to which the fully qualified class names of each
Valve in this Pipeline that does not support async will be
addedpublic Container getContainer()
getContainer in interface Containednull if not associated with a Containerpublic void setContainer(Container container)
setContainer in interface Containedcontainer - The new associated containerprotected void initInternal()
LifecycleBaseinitInternal in class LifecycleBaseprotected void startInternal()
throws LifecycleException
Valves) in this pipeline and implement the requirements
of LifecycleBase.startInternal().startInternal in class LifecycleBaseLifecycleException - if this component detects a fatal error
that prevents this component from being usedprotected void stopInternal()
throws LifecycleException
Valves) in this pipeline and implement the requirements
of LifecycleBase.stopInternal().stopInternal in class LifecycleBaseLifecycleException - if this component detects a fatal error
that prevents this component from being usedprotected void destroyInternal()
LifecycleBasedestroyInternal in class LifecycleBasepublic String toString()
public Valve getBasic()
Return the Valve instance that has been distinguished as the basic Valve for this Pipeline (if any).
public void setBasic(Valve valve)
Set the Valve instance that has been distinguished as the basic
Valve for this Pipeline (if any). Prior 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.
public 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 addedIllegalArgumentException - if this Container refused to
accept the specified ValveIllegalArgumentException - if the specified Valve refuses to be
associated with this ContainerIllegalStateException - if the specified Valve is already
associated with a different Containerpublic Valve[] getValves()
public ObjectName[] getValveObjectNames()
public void removeValve(Valve valve)
setContainer(null) method
will be called if it implements Contained.removeValve in interface Pipelinevalve - Valve to be removedCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.