Package org.apache.catalina.valves
Class ValveBase
- java.lang.Object
- 
- org.apache.catalina.util.LifecycleBase
- 
- org.apache.catalina.util.LifecycleMBeanBase
- 
- org.apache.catalina.valves.ValveBase
 
 
 
- 
- All Implemented Interfaces:
- javax.management.MBeanRegistration,- Contained,- JmxEnabled,- Lifecycle,- Valve
 - Direct Known Subclasses:
- AbstractAccessLogValve,- AuthenticatorBase,- CrawlerSessionManagerValve,- ErrorReportValve,- JDBCAccessLogValve,- JvmRouteBinderValve,- LoadBalancerDrainingValve,- PersistentValve,- RemoteIpValve,- ReplicationValve,- RequestFilterValve,- RewriteValve,- SemaphoreValve,- SingleSignOn,- SSLValve,- StuckThreadDetectionValve
 
 public abstract class ValveBase extends LifecycleMBeanBase implements Contained, Valve Convenience base class for implementations of the Valve interface. A subclass MUST implement aninvoke()method to provide the required functionality, and MAY implement theLifecycleinterface to provide configuration management and lifecycle support.- Author:
- Craig R. McClanahan
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.apache.catalina.LifecycleLifecycle.SingleUse
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected booleanasyncSupportedDoes this valve support Servlet 3+ async requests?protected ContainercontainerThe Container whose pipeline this Valve is a component of.protected LogcontainerLogContainer logprotected ValvenextThe next Valve in the pipeline this Valve is a component of.protected static StringManagersm- 
Fields inherited from class org.apache.catalina.util.LifecycleMBeanBasemserver
 - 
Fields inherited from interface org.apache.catalina.LifecycleAFTER_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
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbackgroundProcess()Execute a periodic task, such as reloading, etc.ContainergetContainer()Return the Container with which this Valve is associated, if any.java.lang.StringgetDomainInternal()Method implemented by sub-classes to identify the domain in which MBeans should be registered.ValvegetNext()Return the next Valve in this pipeline, ornullif this is the last Valve in the pipeline.java.lang.StringgetObjectNameKeyProperties()Allow sub-classes to specify the key properties component of theObjectNamethat will be used to register this component.protected voidinitInternal()Sub-classes wishing to perform additional initialization should override this method, ensuring that super.initInternal() is the first call in the overriding method.booleanisAsyncSupported()voidsetAsyncSupported(boolean asyncSupported)voidsetContainer(Container container)Set the Container with which this Valve is associated, if any.voidsetNext(Valve valve)Set the Valve that follows this one in the pipeline it is part of.protected voidstartInternal()Start this component and implement the requirements ofLifecycleBase.startInternal().protected voidstopInternal()Stop this component and implement the requirements ofLifecycleBase.stopInternal().java.lang.StringtoString()Return a String rendering of this object.- 
Methods inherited from class org.apache.catalina.util.LifecycleMBeanBasedestroyInternal, getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister
 - 
Methods inherited from class org.apache.catalina.util.LifecycleBaseaddLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stop
 
- 
 
- 
- 
- 
Field Detail- 
smprotected static final StringManager sm 
 - 
asyncSupportedprotected boolean asyncSupported Does this valve support Servlet 3+ async requests?
 - 
containerprotected Container container The Container whose pipeline this Valve is a component of.
 - 
containerLogprotected Log containerLog Container log
 - 
nextprotected Valve next The next Valve in the pipeline this Valve is a component of.
 
- 
 - 
Method Detail- 
getContainerpublic Container getContainer() Return the Container with which this Valve is associated, if any.- Specified by:
- getContainerin interface- Contained
- Returns:
- The Container with which this instance is associated or
         nullif not associated with a Container
 
 - 
setContainerpublic void setContainer(Container container) Set the Container with which this Valve is associated, if any.- Specified by:
- setContainerin interface- Contained
- Parameters:
- container- The new associated container
 
 - 
isAsyncSupportedpublic boolean isAsyncSupported() - Specified by:
- isAsyncSupportedin interface- Valve
 
 - 
setAsyncSupportedpublic void setAsyncSupported(boolean asyncSupported) 
 - 
getNextpublic Valve getNext() Return the next Valve in this pipeline, ornullif this is the last Valve in the pipeline.
 - 
setNextpublic void setNext(Valve valve) Set the Valve that follows this one in the pipeline it is part of.
 - 
backgroundProcesspublic void backgroundProcess() Execute a periodic task, such as reloading, etc. This method will be invoked inside the classloading context of this container. Unexpected throwables will be caught and logged.- Specified by:
- backgroundProcessin interface- Valve
 
 - 
initInternalprotected void initInternal() throws LifecycleExceptionDescription copied from class:LifecycleMBeanBaseSub-classes wishing to perform additional initialization should override this method, ensuring that super.initInternal() is the first call in the overriding method.- Overrides:
- initInternalin class- LifecycleMBeanBase
- Throws:
- LifecycleException- If the initialisation fails
 
 - 
startInternalprotected void startInternal() throws LifecycleExceptionStart this component and implement the requirements ofLifecycleBase.startInternal().- Specified by:
- startInternalin class- LifecycleBase
- Throws:
- LifecycleException- if this component detects a fatal error that prevents this component from being used
 
 - 
stopInternalprotected void stopInternal() throws LifecycleExceptionStop this component and implement the requirements ofLifecycleBase.stopInternal().- Specified by:
- stopInternalin class- LifecycleBase
- Throws:
- LifecycleException- if this component detects a fatal error that prevents this component from being used
 
 - 
toStringpublic java.lang.String toString() Return a String rendering of this object.- Overrides:
- toStringin class- java.lang.Object
 
 - 
getObjectNameKeyPropertiespublic java.lang.String getObjectNameKeyProperties() Description copied from class:LifecycleMBeanBaseAllow sub-classes to specify the key properties component of theObjectNamethat will be used to register this component.- Specified by:
- getObjectNameKeyPropertiesin class- LifecycleMBeanBase
- Returns:
- The string representation of the key properties component of the
          desired ObjectName
 
 - 
getDomainInternalpublic java.lang.String getDomainInternal() Description copied from class:LifecycleMBeanBaseMethod implemented by sub-classes to identify the domain in which MBeans should be registered.- Specified by:
- getDomainInternalin class- LifecycleMBeanBase
- Returns:
- The name of the domain to use to register MBeans.
 
 
- 
 
-