org.apache.camel.guice
Class CamelModuleWithRouteTypes

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by org.apache.camel.guice.support.GuiceyFruitModule
          extended by org.apache.camel.guice.jsr250.Jsr250Module
              extended by org.apache.camel.guice.CamelModule
                  extended by org.apache.camel.guice.CamelModuleWithRouteTypes
All Implemented Interfaces:
com.google.inject.Module

public class CamelModuleWithRouteTypes
extends CamelModule

A Guice Module which injects the CamelContext with the specified RoutesBuilder types - which are then injected by Guice.

If you wish to bind all of the bound RoutesBuilder implementations available - maybe with some filter applied - then please use the CamelModuleWithMatchingRoutes.

Or if you would like to specify exactly which RoutesBuilder to bind then use the CamelModule and create a provider method annotated with @Provides and returning Set such as

 public class MyModule extends CamelModule {
   @Provides
   Set<Routes> routes(Injector injector) { ... }
 }
 

Version:

Constructor Summary
CamelModuleWithRouteTypes(Class<? extends org.apache.camel.RoutesBuilder>... routeTypes)
           
CamelModuleWithRouteTypes(Set<Class<? extends org.apache.camel.RoutesBuilder>> routes)
           
 
Method Summary
 
Methods inherited from class org.apache.camel.guice.CamelModule
configure, configureCamelContext
 
Methods inherited from class org.apache.camel.guice.support.GuiceyFruitModule
bind, bind, bind, bindAnnotationInjector, bindAnnotationInjector, bindAnnotationInjector, bindInstance, bindMethodHandler, bindMethodHandler, bindMethodHandler, checkInjectedValueType, getParameterType
 
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

CamelModuleWithRouteTypes

public CamelModuleWithRouteTypes(Class<? extends org.apache.camel.RoutesBuilder>... routeTypes)

CamelModuleWithRouteTypes

public CamelModuleWithRouteTypes(Set<Class<? extends org.apache.camel.RoutesBuilder>> routes)


Apache Camel