org.jclouds.lifecycle.config
Class LifeCycleModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by 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 PostConstruct after injection, and Associate PreDestroy with a global Closer object.

Important

Make sure you create your injector with Stage.PRODUCTION and execute the bound ExecutionList prior to using any other objects.

Ex.

 
 

Author:
Adrian Cole

Constructor Summary
LifeCycleModule()
           
 
Method Summary
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, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LifeCycleModule

public LifeCycleModule()
Method Detail

configure

protected void configure()
Specified by:
configure in class com.google.inject.AbstractModule

bindPostInjectionInvoke

protected void bindPostInjectionInvoke(Closer closer,
                                       com.google.common.util.concurrent.ExecutionList list)


Copyright © 2009-2012 jclouds. All Rights Reserved.