Search in sources :

Example 1 with Destroyable

use of org.eclipse.jetty.util.component.Destroyable in project jetty.project by eclipse.

the class ShutdownThread method run.

/* ------------------------------------------------------------ */
@Override
public void run() {
    for (LifeCycle lifeCycle : _thread._lifeCycles) {
        try {
            if (lifeCycle.isStarted()) {
                lifeCycle.stop();
                LOG.debug("Stopped {}", lifeCycle);
            }
            if (lifeCycle instanceof Destroyable) {
                ((Destroyable) lifeCycle).destroy();
                LOG.debug("Destroyed {}", lifeCycle);
            }
        } catch (Exception ex) {
            LOG.debug(ex);
        }
    }
}
Also used : LifeCycle(org.eclipse.jetty.util.component.LifeCycle) Destroyable(org.eclipse.jetty.util.component.Destroyable)

Aggregations

Destroyable (org.eclipse.jetty.util.component.Destroyable)1 LifeCycle (org.eclipse.jetty.util.component.LifeCycle)1