/** * The ContainerEvent event type sent when a valve is added * by <code>addValve()</code>, if this Container supports pipelines. */ publicstaticfinalStringADD_VALVE_EVENT="addValve";
/** * The ContainerEvent event type sent when a child container is removed * by <code>removeChild()</code>. */ publicstaticfinalStringREMOVE_CHILD_EVENT="removeChild";
/** * The ContainerEvent event type sent when a valve is removed * by <code>removeValve()</code>, if this Container supports pipelines. */ publicstaticfinalStringREMOVE_VALVE_EVENT="removeValve";
// Stop the Valves in our pipeline (including the basic), if any if (pipeline instanceof Lifecycle && ((Lifecycle) pipeline).getState().isAvailable()) { ((Lifecycle) pipeline).stop(); }
// Stop our child containers, if any Container children[] = findChildren(); List<Future<Void>> results = newArrayList<>(); for (Container child : children) { results.add(startStopExecutor.submit(newStopChild(child))); }
booleanfail=false; for (Future<Void> result : results) { try { result.get(); } catch (Exception e) { log.error(sm.getString("containerBase.threadedStopFailed"), e); fail = true; } } if (fail) { thrownewLifecycleException( sm.getString("containerBase.threadedStopFailed")); }
// Stop our subordinate components, if any Realmrealm= getRealmInternal(); if (realm instanceof Lifecycle) { ((Lifecycle) realm).stop(); } Clustercluster= getClusterInternal(); if (cluster instanceof Lifecycle) { ((Lifecycle) cluster).stop(); } }