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 void
addEventListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener)
void
addServerLifecycleListener(ServerLifecycleListener listener)
void
attach(org.eclipse.jetty.util.component.ContainerLifeCycle container)
ExecutorServiceBuilder
executorService(String nameFormat)
ExecutorServiceBuilder
executorService(String nameFormat, ThreadFactory factory)
List<org.eclipse.jetty.util.component.LifeCycle>
getManagedObjects()
com.codahale.metrics.MetricRegistry
getMetricRegistry()
void
manage(Managed managed)
Adds the givenManaged
instance to the set of objects managed by the server's lifecycle.void
manage(org.eclipse.jetty.util.component.LifeCycle managed)
Adds the given JettyLifeCycle
instances to the server's lifecycle.ScheduledExecutorServiceBuilder
scheduledExecutorService(String nameFormat)
ScheduledExecutorServiceBuilder
scheduledExecutorService(String nameFormat, boolean useDaemonThreads)
ScheduledExecutorServiceBuilder
scheduledExecutorService(String nameFormat, ThreadFactory factory)
-
-
-
Method Detail
-
getManagedObjects
public List<org.eclipse.jetty.util.component.LifeCycle> getManagedObjects()
-
manage
public void manage(Managed managed)
Adds the givenManaged
instance to the set of objects managed by the server's lifecycle. When the server starts,managed
will be started. When the server stops,managed
will be stopped.- Parameters:
managed
- a managed object
-
manage
public void manage(org.eclipse.jetty.util.component.LifeCycle managed)
Adds the given JettyLifeCycle
instances 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)
-
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
-
-