MCPcopy Index your code
hub / github.com/apache/tomcat / ContainerBase

Class ContainerBase

java/org/apache/catalina/core/ContainerBase.java:119–1220  ·  view source on GitHub ↗

Abstract implementation of the Container interface, providing common functionality required by nearly every implementation. Classes extending this base class must may implement a replacement for invoke() . All subclasses of this abstract base class will include support for a P

Source from the content-addressed store, hash-verified

117 * Subclasses that fire additional events should document them in the class comments of the implementation class.
118 */
119public abstract class ContainerBase extends LifecycleMBeanBase implements Container {
120
121 private static final Log log = LogFactory.getLog(ContainerBase.class);
122
123 /**
124 * Constructs a new ContainerBase instance.
125 */
126 public ContainerBase() {
127 }
128
129
130 // ----------------------------------------------------- Instance Variables
131
132 /**
133 * The child Containers belonging to this Container, keyed by name.
134 */
135 protected final HashMap<String,Container> children = new HashMap<>();
136 private final ReadWriteLock childrenLock = new ReentrantReadWriteLock();
137
138
139 /**
140 * The processor delay for this component.
141 */
142 protected int backgroundProcessorDelay = -1;
143
144
145 /**
146 * The future allowing control of the background processor.
147 */
148 protected ScheduledFuture<?> backgroundProcessorFuture;
149 /**
150 * The future allowing control of the monitor thread.
151 */
152 protected ScheduledFuture<?> monitorFuture;
153
154 /**
155 * The container event listeners for this Container. Implemented as a CopyOnWriteArrayList since listeners may
156 * invoke methods to add/remove themselves or other listeners and with a ReadWriteLock that would trigger a
157 * deadlock.
158 */
159 protected final List<ContainerListener> listeners = new CopyOnWriteArrayList<>();
160
161 /**
162 * The Logger implementation with which this Container is associated.
163 */
164 protected Log logger = null;
165
166
167 /**
168 * Associated logger name.
169 */
170 protected String logName = null;
171
172
173 /**
174 * The cluster with which this Container is associated.
175 */
176 protected Cluster cluster = null;

Callers

nothing calls this directly

Calls 2

getLogMethod · 0.95
getManagerMethod · 0.95

Tested by

no test coverage detected