Process the START event for an associated Host. @param event The lifecycle event that has occurred
(LifecycleEvent event)
| 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 | /** |
nothing calls this directly
no test coverage detected