Package io.dropwizard.lifecycle.setup
Class LifecycleEnvironment
- java.lang.Object
-
- io.dropwizard.lifecycle.setup.LifecycleEnvironment
-
public class LifecycleEnvironment extends Object
-
-
Constructor Summary
Constructors Constructor Description LifecycleEnvironment(com.codahale.metrics.MetricRegistry metricRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEventListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener)voidaddServerLifecycleListener(ServerLifecycleListener listener)voidattach(org.eclipse.jetty.util.component.ContainerLifeCycle container)ExecutorServiceBuilderexecutorService(String nameFormat)ExecutorServiceBuilderexecutorService(String nameFormat, ThreadFactory factory)List<org.eclipse.jetty.util.component.LifeCycle>getManagedObjects()com.codahale.metrics.MetricRegistrygetMetricRegistry()voidmanage(Managed managed)Adds the givenManagedinstance to the set of objects managed by the server's lifecycle.voidmanage(org.eclipse.jetty.util.component.LifeCycle managed)Adds the given JettyLifeCycleinstances to the server's lifecycle.ScheduledExecutorServiceBuilderscheduledExecutorService(String nameFormat)ScheduledExecutorServiceBuilderscheduledExecutorService(String nameFormat, boolean useDaemonThreads)ScheduledExecutorServiceBuilderscheduledExecutorService(String nameFormat, ThreadFactory factory)ExecutorServicevirtualExecutorService(String nameFormat)ExecutorServicevirtualExecutorService(String nameFormat, Duration shutdownTime)
-
-
-
Method Detail
-
getManagedObjects
public List<org.eclipse.jetty.util.component.LifeCycle> getManagedObjects()
-
manage
public void manage(Managed managed)
Adds the givenManagedinstance to the set of objects managed by the server's lifecycle. When the server starts,managedwill be started. When the server stops,managedwill be stopped.- Parameters:
managed- a managed object
-
manage
public void manage(org.eclipse.jetty.util.component.LifeCycle managed)
Adds the given JettyLifeCycleinstances to the server's lifecycle.- Parameters:
managed- a Jetty-managed object
-
executorService
public ExecutorServiceBuilder executorService(String nameFormat)
-
executorService
public ExecutorServiceBuilder executorService(String nameFormat, ThreadFactory factory)
-
virtualExecutorService
public ExecutorService virtualExecutorService(String nameFormat)
-
virtualExecutorService
public ExecutorService virtualExecutorService(String nameFormat, Duration shutdownTime)
-
scheduledExecutorService
public ScheduledExecutorServiceBuilder scheduledExecutorService(String nameFormat)
-
scheduledExecutorService
public ScheduledExecutorServiceBuilder scheduledExecutorService(String nameFormat, ThreadFactory factory)
-
scheduledExecutorService
public ScheduledExecutorServiceBuilder scheduledExecutorService(String nameFormat, boolean useDaemonThreads)
-
addServerLifecycleListener
public void addServerLifecycleListener(ServerLifecycleListener listener)
-
addEventListener
public void addEventListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener)
-
attach
public void attach(org.eclipse.jetty.util.component.ContainerLifeCycle container)
-
getMetricRegistry
public com.codahale.metrics.MetricRegistry getMetricRegistry()
- Since:
- 2.0
-
-