Package com.spotify.apollo.module
Class AbstractApolloModule
- java.lang.Object
-
- com.google.inject.AbstractModule
-
- com.spotify.apollo.module.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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.spotify.apollo.module.ApolloModule
getId
-
-
-
-
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 classcom.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 is0.0
.- Specified by:
getPriority
in interfaceApolloModule
- 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 implementCloseable
will be closed on shutdown.- Specified by:
getLifecycleManaged
in interfaceApolloModule
- Returns:
- the set of injection keys that should be bound to the service lifecycle.
-
-