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 PostConstruct after injection, and Associate PreDestroy with a global Closer object.

Important

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

Ex.

 
 
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    bindPostInjectionInvoke(Closer closer, com.google.common.util.concurrent.ExecutionList list)
     
    protected void
     

    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, requestInjection, requestStaticInjection, requireBinding, requireBinding

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LifeCycleModule

      public LifeCycleModule()
  • Method Details

    • configure

      protected void configure()
      Overrides:
      configure in class com.google.inject.AbstractModule
    • bindPostInjectionInvoke

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