this.child = child;
}
+ @Override
public Void run() {
addChildInternal(child);
return null;
* the thread will invoke the executePeriodic method on this container
* and all its children.
*/
+ @Override
public int getBackgroundProcessorDelay() {
return backgroundProcessorDelay;
}
* @param delay The delay in seconds between the invocation of
* backgroundProcess methods
*/
+ @Override
public void setBackgroundProcessorDelay(int delay) {
backgroundProcessorDelay = delay;
}
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return this.getClass().getName();
}
* no associated Loader, return the Loader associated with our parent
* Container (if any); otherwise, return <code>null</code>.
*/
+ @Override
public Loader getLoader() {
if (loader != null)
*
* @param loader The newly associated loader
*/
+ @Override
public synchronized void setLoader(Loader loader) {
// Change components if necessary
/**
* Return the Logger for this Container.
*/
+ @Override
public Log getLogger() {
if (logger != null)
* no associated Manager, return the Manager associated with our parent
* Container (if any); otherwise return <code>null</code>.
*/
+ @Override
public Manager getManager() {
if (manager != null)
*
* @param manager The newly associated Manager
*/
+ @Override
public synchronized void setManager(Manager manager) {
// Change components if necessary
/**
* Return an object which may be utilized for mapping to this component.
*/
+ @Override
public Object getMappingObject() {
return this;
}
* no associated Cluster, return the Cluster associated with our parent
* Container (if any); otherwise return <code>null</code>.
*/
+ @Override
public Cluster getCluster() {
if (cluster != null)
return (cluster);
*
* @param cluster The newly associated Cluster
*/
+ @Override
public synchronized void setCluster(Cluster cluster) {
// Change components if necessary
Cluster oldCluster = this.cluster;
* Container. Within the set of child containers belonging to a particular
* parent, Container names must be unique.
*/
+ @Override
public String getName() {
return (name);
* added to the children of a parent Container (after which the name
* may not be changed)
*/
+ @Override
public void setName(String name) {
String oldName = this.name;
* Return the Container for which this Container is a child, if there is
* one. If there is no defined parent, return <code>null</code>.
*/
+ @Override
public Container getParent() {
return (parent);
* @exception IllegalArgumentException if this Container refuses to become
* attached to the specified Container
*/
+ @Override
public void setParent(Container container) {
Container oldParent = this.parent;
* This call is meaningful only <strong>after</strong> a Loader has
* been configured.
*/
+ @Override
public ClassLoader getParentClassLoader() {
if (parentClassLoader != null)
return (parentClassLoader);
*
* @param parent The new parent class loader
*/
+ @Override
public void setParentClassLoader(ClassLoader parent) {
ClassLoader oldParentClassLoader = this.parentClassLoader;
this.parentClassLoader = parent;
* Return the Pipeline object that manages the Valves associated with
* this Container.
*/
+ @Override
public Pipeline getPipeline() {
return (this.pipeline);
* no associated Realm, return the Realm associated with our parent
* Container (if any); otherwise return <code>null</code>.
*/
+ @Override
public Realm getRealm() {
if (realm != null)
*
* @param realm The newly associated Realm
*/
+ @Override
public synchronized void setRealm(Realm realm) {
// Change components if necessary
* resources associated with our parent Container (if any); otherwise
* return <code>null</code>.
*/
+ @Override
public DirContext getResources() {
if (resources != null)
return (resources);
*
* @param resources The newly associated DirContext
*/
+ @Override
public synchronized void setResources(DirContext resources) {
// Called from StandardContext.setResources()
// <- StandardContext.start()
* @exception IllegalStateException if this Container does not support
* child Containers
*/
+ @Override
public void addChild(Container child) {
if (Globals.IS_SECURITY_ENABLED) {
PrivilegedAction<Void> dp =
*
* @param listener The listener to add
*/
+ @Override
public void addContainerListener(ContainerListener listener) {
synchronized (listeners) {
*
* @param listener The listener to add
*/
+ @Override
public void addPropertyChangeListener(PropertyChangeListener listener) {
support.addPropertyChangeListener(listener);
*
* @param name Name of the child Container to be retrieved
*/
+ @Override
public Container findChild(String name) {
if (name == null)
* Return the set of children Containers associated with this Container.
* If this Container has no children, a zero-length array is returned.
*/
+ @Override
public Container[] findChildren() {
synchronized (children) {
* If this Container has no registered container listeners, a zero-length
* array is returned.
*/
+ @Override
public ContainerListener[] findContainerListeners() {
synchronized (listeners) {
* @exception ServletException if a ServletException was thrown
* while processing this request
*/
+ @Override
public void invoke(Request request, Response response)
throws IOException, ServletException {
*
* @param child Existing child Container to be removed
*/
+ @Override
public void removeChild(Container child) {
if (child == null) {
*
* @param listener The listener to remove
*/
+ @Override
public void removeContainerListener(ContainerListener listener) {
synchronized (listeners) {
*
* @param listener The listener to remove
*/
+ @Override
public void removePropertyChangeListener(PropertyChangeListener listener) {
support.removePropertyChangeListener(listener);
* parent. If there is no parent and still none is found, use the NoOp
* access log.
*/
+ @Override
public void logAccess(Request request, Response response, long time,
boolean useDefault) {
}
}
+ @Override
public AccessLog getAccessLog() {
if (accessLogScanComplete) {
* invoked inside the classloading context of this container. Unexpected
* throwables will be caught and logged.
*/
+ @Override
public void backgroundProcess() {
if (!getState().isAvailable())
* @param type Event type
* @param data Event data
*/
+ @Override
public void fireContainerEvent(String type, Object data) {
if (listeners.size() < 1)
*/
protected class ContainerBackgroundProcessor implements Runnable {
+ @Override
public void run() {
while (!threadDone) {
try {