public abstract class ValveBase extends LifecycleMBeanBase implements Contained, Valve
invoke() method to provide the required functionality, and MAY implement the
Lifecycle interface to provide configuration management and lifecycle support.Lifecycle.SingleUse| Modifier and Type | Field and Description |
|---|---|
protected boolean |
asyncSupported
Does this valve support Servlet 3+ async requests?
|
protected Container |
container
The Container whose pipeline this Valve is a component of.
|
protected Log |
containerLog
Container log
|
protected Valve |
next
The next Valve in the pipeline this Valve is a component of.
|
protected static StringManager |
sm |
mserverAFTER_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 |
|---|
ValveBase() |
ValveBase(boolean asyncSupported) |
| Modifier and Type | Method and Description |
|---|---|
void |
backgroundProcess()
Execute a periodic task, such as reloading, etc.
|
Container |
getContainer()
Get the
Container with which this instance is associated. |
java.lang.String |
getDomainInternal()
Method implemented by sub-classes to identify the domain in which MBeans
should be registered.
|
Valve |
getNext()
Returns the next Valve in this pipeline, or
null if this is
the last Valve in the pipeline. |
java.lang.String |
getObjectNameKeyProperties()
Allow sub-classes to specify the key properties component of the
ObjectName that will be used to register this component. |
protected void |
initInternal()
Sub-classes wishing to perform additional initialization should override
this method, ensuring that super.initInternal() is the first call in the
overriding method.
|
boolean |
isAsyncSupported() |
void |
setAsyncSupported(boolean asyncSupported) |
void |
setContainer(Container container)
Set the
Container with which this instance is associated. |
void |
setNext(Valve valve)
Set the next Valve in the pipeline containing this Valve.
|
protected void |
startInternal()
Start this component and implement the requirements of
LifecycleBase.startInternal(). |
protected void |
stopInternal()
Stop this component and implement the requirements of
LifecycleBase.stopInternal(). |
java.lang.String |
toString() |
destroyInternal, getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister, unregisteraddLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stopprotected static final StringManager sm
protected boolean asyncSupported
protected Container container
protected Log containerLog
protected Valve next
public Container getContainer()
ContainedContainer with which this instance is associated.getContainer in interface Containednull if not associated with a Containerpublic void setContainer(Container container)
ContainedContainer with which this instance is associated.setContainer in interface Containedcontainer - The Container instance with which this instance is to
be associated, or null to disassociate this instance
from any Containerpublic boolean isAsyncSupported()
isAsyncSupported in interface Valvepublic void setAsyncSupported(boolean asyncSupported)
public Valve getNext()
Valvenull if this is
the last Valve in the pipeline.public void setNext(Valve valve)
Valvepublic void backgroundProcess()
The default implementation is NO-OP.
backgroundProcess in interface Valveprotected void initInternal()
throws LifecycleException
LifecycleMBeanBaseinitInternal in class LifecycleMBeanBaseLifecycleException - If the initialisation failsprotected void startInternal()
throws LifecycleException
LifecycleBase.startInternal().startInternal in class LifecycleBaseLifecycleException - if this component detects a fatal error that prevents this component from being
usedprotected void stopInternal()
throws LifecycleException
LifecycleBase.stopInternal().stopInternal in class LifecycleBaseLifecycleException - if this component detects a fatal error that prevents this component from being
usedpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getObjectNameKeyProperties()
LifecycleMBeanBaseObjectName that will be used to register this component.getObjectNameKeyProperties in class LifecycleMBeanBaseObjectNamepublic java.lang.String getDomainInternal()
LifecycleMBeanBasegetDomainInternal in class LifecycleMBeanBaseCopyright © 2000-2024 Apache Software Foundation.
Apache Tomcat, Tomcat, Apache, the Apache Tomcat logo and the Apache logo are either registered trademarks or trademarks of the Apache Software Foundation.