Process the START and STOP events for an associated Host. @param event The lifecycle event that has occurred
(LifecycleEvent event)
| 270 | * @param event The lifecycle event that has occurred |
| 271 | */ |
| 272 | @Override |
| 273 | public void lifecycleEvent(LifecycleEvent event) { |
| 274 | |
| 275 | // Identify the host we are associated with |
| 276 | try { |
| 277 | host = (Host) event.getLifecycle(); |
| 278 | } catch (ClassCastException e) { |
| 279 | log.error(sm.getString("hostConfig.cce", event.getLifecycle()), e); |
| 280 | return; |
| 281 | } |
| 282 | |
| 283 | // Process the event that has occurred |
| 284 | if (event.getType().equals(Lifecycle.START_EVENT)) { |
| 285 | start(); |
| 286 | } else if (event.getType().equals(Lifecycle.STOP_EVENT)) { |
| 287 | stop(); |
| 288 | } |
| 289 | |
| 290 | } |
| 291 | |
| 292 | |
| 293 | // -------------------------------------------------------- Private Methods |