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

Method lifecycleEvent

java/org/apache/catalina/startup/HostConfig.java:265–289  ·  view source on GitHub ↗

Process the START event for an associated Host. @param event The lifecycle event that has occurred

(LifecycleEvent event)

Source from the content-addressed store, hash-verified

263 * @param event The lifecycle event that has occurred
264 */
265 @Override
266 public void lifecycleEvent(LifecycleEvent event) {
267
268 // Identify the host we are associated with
269 try {
270 host = (Host) event.getLifecycle();
271 if (host instanceof StandardHost) {
272 setCopyXML(((StandardHost) host).isCopyXML());
273 setDeployXML(((StandardHost) host).isDeployXML());
274 setUnpackWARs(((StandardHost) host).isUnpackWARs());
275 setContextClass(((StandardHost) host).getContextClass());
276 }
277 } catch (ClassCastException e) {
278 log.error(sm.getString("hostConfig.cce", event.getLifecycle()), e);
279 return;
280 }
281
282 // Process the event that has occurred
283 switch (event.getType()) {
284 case Lifecycle.PERIODIC_EVENT -> check();
285 case Lifecycle.BEFORE_START_EVENT -> beforeStart();
286 case Lifecycle.START_EVENT -> start();
287 case Lifecycle.STOP_EVENT -> stop();
288 }
289 }
290
291
292 /**

Callers

nothing calls this directly

Calls 15

setCopyXMLMethod · 0.95
setDeployXMLMethod · 0.95
setUnpackWARsMethod · 0.95
setContextClassMethod · 0.95
checkMethod · 0.95
beforeStartMethod · 0.95
startMethod · 0.95
stopMethod · 0.95
getLifecycleMethod · 0.80
errorMethod · 0.65
getStringMethod · 0.65
getTypeMethod · 0.65

Tested by

no test coverage detected