Package io.dropwizard.lifecycle.setup
Class LifecycleEnvironment
java.lang.Object
io.dropwizard.lifecycle.setup.LifecycleEnvironment
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEventListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener) voidvoidattach(org.eclipse.jetty.util.component.ContainerLifeCycle container) executorService(String nameFormat) executorService(String nameFormat, ThreadFactory factory) List<org.eclipse.jetty.util.component.LifeCycle>com.codahale.metrics.MetricRegistryvoidAdds 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.scheduledExecutorService(String nameFormat) scheduledExecutorService(String nameFormat, boolean useDaemonThreads) scheduledExecutorService(String nameFormat, ThreadFactory factory) virtualExecutorService(String nameFormat) virtualExecutorService(String nameFormat, io.dropwizard.util.Duration shutdownTime)
-
Constructor Details
-
LifecycleEnvironment
public LifecycleEnvironment(com.codahale.metrics.MetricRegistry metricRegistry)
-
-
Method Details
-
getManagedObjects
-
manage
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
-
executorService
-
virtualExecutorService
-
virtualExecutorService
public ExecutorService virtualExecutorService(String nameFormat, io.dropwizard.util.Duration shutdownTime) -
scheduledExecutorService
-
scheduledExecutorService
public ScheduledExecutorServiceBuilder scheduledExecutorService(String nameFormat, ThreadFactory factory) -
scheduledExecutorService
public ScheduledExecutorServiceBuilder scheduledExecutorService(String nameFormat, boolean useDaemonThreads) -
addServerLifecycleListener
-
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
-