Managed installer¶
CoreInstallersBundle / ManagedInstaller
Installs dropwizard managed objects.
Recognition¶
Detects classes implementing dropwizard Managed
and register their instances in environment.
public class MyService implements Managed { @Override public void start() throws Exception { ... } @Override public void stop() throws Exception { ... } }
It is perfect for implementing guice service lifecycle.
Tip
Alternatively you can use @PostConstruct
and @PreDestroy
annotations inside guice beans
with lifecycle-annotations extension module.
Tip
Use guicey @Order
annotation to order managed objects.
@Order(10) public class MyService implements Managed