Package org.jclouds.lifecycle.config
Class LifeCycleModule
- java.lang.Object
-
- com.google.inject.AbstractModule
-
- org.jclouds.lifecycle.config.LifeCycleModule
-
- All Implemented Interfaces:
com.google.inject.Module
public class LifeCycleModule extends com.google.inject.AbstractModule
This associates java lifecycle annotations with guice hooks. For example, we invokePostConstruct
after injection, and AssociatePreDestroy
with a globalCloser
object.Important
Make sure you create your injector withStage#PRODUCTION
and execute the boundExecutionList
prior to using any other objects. Ex.
-
-
Constructor Summary
Constructors Constructor Description LifeCycleModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
bindPostInjectionInvoke(Closer closer, com.google.common.util.concurrent.ExecutionList list)
protected void
configure()
-
Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
-
-
-
Method Detail
-
configure
protected void configure()
- Overrides:
configure
in classcom.google.inject.AbstractModule
-
bindPostInjectionInvoke
protected void bindPostInjectionInvoke(Closer closer, com.google.common.util.concurrent.ExecutionList list)
-
-