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 invoke
and execute the bound
PostConstruct after
injection, and Associate PreDestroy with a global Closer object.
Important
Make sure you create your injector withinvalid reference
Stage#PRODUCTION
ExecutionList prior to using any other objects.
Ex.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbindPostInjectionInvoke(Closer closer, com.google.common.util.concurrent.ExecutionList list) protected voidMethods 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
-
Constructor Details
-
LifeCycleModule
public LifeCycleModule()
-
-
Method Details
-
configure
protected void configure()- Overrides:
configurein classcom.google.inject.AbstractModule
-
bindPostInjectionInvoke
protected void bindPostInjectionInvoke(Closer closer, com.google.common.util.concurrent.ExecutionList list)
-