Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This is because the configure() method on a RouteBuilder is called after the CamelContext is created and it is bound to a CamelContext, so you can resolve any components or endpoint dynamically through the CamelContext (using via helper methods like endpoint() (which uses Guice under the covers for any dependency injection of a Component or Endpoint).

The following example shows how we can add multiple instances of a RouteBuilder class with different parameters. We can clearly dependency inject the MyRouteInstaller from Guice and use those values to pass into the RouteBuilder instances.

...