Class AbstractApolloModule

  • All Implemented Interfaces:
    com.google.inject.Module, ApolloModule

    public abstract class AbstractApolloModule
    extends com.google.inject.AbstractModule
    implements ApolloModule
    A base implementation of an Apollo module.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractApolloModule()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Set<? extends com.google.inject.Key<?>> getLifecycleManaged()
      Returns the immutable, idempotently determined and stable set of injection keys that should be bound to the service lifecycle; i.e.
      double getPriority()
      Returns the priority of this module relative to other modules.
      protected void install​(com.google.inject.Module module)  
      protected void manageLifecycle​(com.google.inject.Key<?> key)  
      protected void manageLifecycle​(Class<?> cls)  
      String toString()  
      • Methods inherited from class com.google.inject.AbstractModule

        addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, requestInjection, requestStaticInjection, requireBinding, requireBinding
      • Methods inherited from interface com.google.inject.Module

        configure
    • Constructor Detail

      • AbstractApolloModule

        protected AbstractApolloModule()
    • Method Detail

      • manageLifecycle

        protected void manageLifecycle​(com.google.inject.Key<?> key)
      • manageLifecycle

        protected void manageLifecycle​(Class<?> cls)
      • install

        protected void install​(com.google.inject.Module module)
        Overrides:
        install in class com.google.inject.AbstractModule
      • getPriority

        public double getPriority()
        Description copied from interface: ApolloModule
        Returns the priority of this module relative to other modules. A higher priority means that initialization will happen earlier for this module. This only matters for independent components of module dependencies; dependencies will always be initialized before the dependees. The default ("don't care") priority is 0.0.
        Specified by:
        getPriority in interface ApolloModule
        Returns:
        the priority of this module relative to other modules.
      • getLifecycleManaged

        public Set<? extends com.google.inject.Key<?>> getLifecycleManaged()
        Description copied from interface: ApolloModule
        Returns the immutable, idempotently determined and stable set of injection keys that should be bound to the service lifecycle; i.e. created on service start-up and destroyed on shutdown. All the instances for the keys returned by this method that implement Closeable will be closed on shutdown.
        Specified by:
        getLifecycleManaged in interface ApolloModule
        Returns:
        the set of injection keys that should be bound to the service lifecycle.