invoke().
All subclasses of this abstract base class will include support for a Pipeline object that defines the processing to
be performed for each request received by the invoke() method of this class, utilizing the "Chain of
Responsibility" design pattern. A subclass should encapsulate its own processing functionality as a
Valve, and configure this Valve into the pipeline by calling setBasic().
This implementation fires property change events, per the JavaBeans design pattern, for changes in singleton
properties. In addition, it fires the following ContainerEvent events to listeners who register
themselves with addContainerListener():
| Type | Data | Description |
|---|---|---|
addChild |
Container |
Child container added to this Container. |
|
Valve |
Valve added to this Container. |
removeChild |
Container |
Child container removed from this Container. |
|
Valve |
Valve removed from this Container. |
start |
null |
Container was started. |
stop |
null |
Container was stopped. |
| Modifier and Type | Class and Description |
|---|---|
| protected class | ContainerBase.
Private runnable class to invoke the backgroundProcess method of this container and its children after a fixed delay. |
| protected class | |
| protected class | ContainerBase.
Perform addChild with the permissions of this class. |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| protected volatile AccessLog | accessLog
The access log to use for requests normally handled by this container that have been handled earlier in the processing chain. |
| private volatile boolean | |
| protected int | backgroundProcessorDelay
The processor delay for this component. |
| protected ScheduledFuture | backgroundProcessorFuture
The future allowing control of the background processor. |
| protected final HashMap | children
The child Containers belonging to this Container, keyed by name. |
| protected Cluster | cluster
The cluster with which this Container is associated. |
| private final ReadWriteLock | |
| protected final List | listeners
The container event listeners for this Container. |
| private static final Log | |
| protected Log | logger
The Logger implementation with which this Container is associated. |
| protected String | logName
Associated logger name. |
| protected ScheduledFuture | |
| protected String | name
The human-readable name of this Container. |
| protected Container | parent
The parent Container to which this Container is a child. |
| protected ClassLoader | parentClassLoader
The parent class loader to be configured when we install a Loader. |
| protected final Pipeline | pipeline
The Pipeline object with which this Container is associated. |
| private volatile Realm | realm
The Realm with which this Container is associated. |
| private final ReadWriteLock | realmLock
Lock used to control access to the Realm. |
| protected static final StringManager | sm
The string manager for this package.
|
| protected boolean | startChildren
Will children be started automatically when they are added. |
| protected ExecutorService | |
| private int | startStopThreads
The number of threads available to process start and stop events for any children associated with this container. |
| protected final PropertyChangeSupport | support
The property change support for this component. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addChild(Container
New child Container to be added child)Implements org. Add a new child Container to those associated with this Container, if supported. |
| private void | |
| public void | addContainerListener(ContainerListener
The listener to add listener)Implements org. Add a container event listener to this component. |
| public void | addPropertyChangeListener(PropertyChangeListener
The listener to add listener)Implements org. Add a property change listener to this component. |
| public synchronized void | |
| public synchronized void | backgroundProcess()
Implements org. Execute a periodic task, such as reloading, etc. This method will be invoked inside the classloading context of this container. |
| protected void | destroyInternal()
Overrides org. Sub-classes wishing to perform additional clean-up should override this method, ensuring that super.destroyInternal() is the last call in the overriding method. |
| public Container | findChild(String
Name of the child Container to be retrieved name)Implements org. Return the child Container, associated with this Container, with the specified name (if any); otherwise, return
|
| public Container[] | findChildren()
Implements org. Return the set of children Containers associated with this Container. |
| public ContainerListener[] | findContainerListeners()
Implements org. Return the set of container listeners associated with this Container. |
| public void | fireContainerEvent(String
Event type type, Object Event data data)Implements org. Notify all container event listeners that a particular event has occurred for this Container. |
| public AccessLog | getAccessLog()
Implements org. Obtain the AccessLog to use to log a request/response that is destined for this container. |
| public int | getBackgroundProcessorDelay()
Implements org. Get the delay between the invocation of the backgroundProcess method on this container and its children. |
| public File | getCatalinaBase()
Implements org. Obtain the location of CATALINA_BASE. |
| public File | getCatalinaHome()
Implements org. Obtain the location of CATALINA_HOME. |
| public ObjectName[] | |
| public Cluster | getCluster()
Implements org. Return the Cluster with which this Container is associated. |
| protected Cluster | |
| protected String | getDomainInternal()
Implements abstract org. Method implemented by sub-classes to identify the domain in which MBeans should be registered. |
| public Log | getLogger()
Implements org. Return the Logger for this Container. |
| public String | Returns: the abbreviated name of this container for logging messagesImplements org. Return the logger name that the container will use. |
| public String | getMBeanKeyProperties()
Implements org. Calculate the key properties string to be added to an object's
|
| public String | getName()
Implements org. Return a name string (suitable for use by humans) that describes this Container. |
| public Container | getParent()
Implements org. Return the Container for which this Container is a child, if there is one. |
| public ClassLoader | getParentClassLoader()
Implements org. Return the parent class loader (if any) for this web application. |
| public Pipeline | getPipeline()
Implements org. Return the Pipeline object that manages the Valves associated with this Container. |
| public Realm | getRealm()
Implements org. Return the Realm with which this Container is associated. |
| protected Realm | |
| public boolean | Returns: true if the children will be startedReturn if children of this container will be started automatically when they are added to this container. |
| public int | getStartStopThreads()
Implements org. Obtain the number of threads available for starting and stopping any children associated with this container. |
| public void | logAccess(Request
Request (associated with the response) to log request, Response Response (associated with the request) to log response, long Time taken to process the request/response in
milliseconds (use 0 if not known) time, boolean Flag that indicates that the request/response should
be logged in the engine's default access log useDefault)Implements org. Check this container for an access log and if none is found, look to the parent. |
| private void | |
| public void | removeChild(Container
Existing child Container to be removed child)Implements org. Remove an existing child Container from association with this parent Container. |
| public void | removeContainerListener(ContainerListener
The listener to remove listener)Implements org. Remove a container event listener from this component. |
| public void | removePropertyChangeListener(PropertyChangeListener
The listener to remove listener)Implements org. Remove a property change listener from this component. |
| public void | setBackgroundProcessorDelay(int
The delay in seconds between the invocation of backgroundProcess methods delay)Implements org. Set the delay between the invocation of the execute method on this container and its children. |
| public void | setCluster(Cluster
The newly associated Cluster cluster)Implements org. Set the Cluster with which this Container is associated. |
| public void | setName(String
New name of this container name)Implements org. Set a name string (suitable for use by humans) that describes this Container. |
| public void | setParent(Container
Container to which this Container is being added as a child container)Implements org. Set the parent Container to which this Container is being added as a child. |
| public void | setParentClassLoader(ClassLoader
The new parent class loader parent)Implements org. Set the parent class loader (if any) for this web application. |
| public void | setRealm(Realm
The newly associated Realm realm)Implements org. Set the Realm with which this Container is associated. |
| public void | setStartChildren(boolean
New value of the startChildren flag startChildren)Set if children of this container will be started automatically when they are added to this container. |
| public void | setStartStopThreads(int
The new number of threads to be used startStopThreads)Implements org. Sets the number of threads available for starting and stopping any children associated with this container. |
| protected void | startInternal()
Implements abstract org. Start this component and implement the requirements of
|
| protected void | stopInternal()
Implements abstract org. Stop this component and implement the requirements of
|
| protected void | |
| protected void | |
| public final String |