All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.avaje.glue.jetty.JettyLifecyleAdapter Maven / Gradle / Ivy

There is a newer version: 1.2
Show newest version
package org.avaje.glue.jetty;

import org.eclipse.jetty.util.component.LifeCycle;

/**
 * Adapts the Jetty lifecycle to Glue ContainerLifecycleListener.
 */
class JettyLifecyleAdapter implements LifeCycle.Listener {

  private final ContainerLifecycleListener listener;

  JettyLifecyleAdapter(ContainerLifecycleListener listener) {
    this.listener = listener;
  }

  @Override
  public void lifeCycleStarting(LifeCycle lifeCycle) {
    listener.starting();
  }

  @Override
  public void lifeCycleStarted(LifeCycle lifeCycle) {
    listener.started();
  }

  @Override
  public void lifeCycleFailure(LifeCycle lifeCycle, Throwable throwable) {
    listener.failure();
  }

  @Override
  public void lifeCycleStopping(LifeCycle lifeCycle) {
    listener.stopping();
  }

  @Override
  public void lifeCycleStopped(LifeCycle lifeCycle) {
    listener.stopped();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy