O'Reilly logo

Mastering Apache Camel by Jean-Baptiste Onofré

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Endpoint

As we saw in the Component interface, the main function of a Component is to create an Endpoint. This is the purpose of the createEndpoint() method. This method returns an Endpoint. You don't explicitly call this method. The Camel routing engine calls this method for you.

When, in a route definition, you use the following syntax:

from("my:options")

During route bootstrap, the Routing Engine is looking for the my component in the CamelContext (loaded as explained before).

If the component is not found, we will have a no component found for scheme my message (wrapped in a CamelRuntimeException).

If the component is found, the routing engine instantiates the endpoint using the createEndpoint() method.

Let's take a look at the Endpoint interface: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required