Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 47. Component Interface
Abstract
						This chapter describes how to implement the 
Component interface.
					47.1. The Component Interface
Copier lienLien copié sur presse-papiers!
Overview
Copier lienLien copié sur presse-papiers!
					To implement a Apache Camel component, you must implement the 
org.apache.camel.Component interface. An instance of Component type provides the entry point into a custom component. That is, all of the other objects in a component are ultimately accessible through the Component instance. Figure 47.1, “Component Inheritance Hierarchy” shows the relevant Java interfaces and classes that make up the Component inheritance hierarchy.
				Figure 47.1. Component Inheritance Hierarchy
The Component interface
Copier lienLien copié sur presse-papiers!
					Example 47.1, “Component Interface” shows the definition of the 
org.apache.camel.Component interface.
				Example 47.1. Component Interface
Component methods
Copier lienLien copié sur presse-papiers!
					The 
Component interface defines the following methods:
				- getCamelContext()and- setCamelContext()—References the- CamelContextto which this- Componentbelongs. The- setCamelContext()method is automatically called when you add the component to a- CamelContext.
- createEndpoint()—The factory method that gets called to create- Endpointinstances for this component. The- uriparameter is the endpoint URI, which contains the details required to create the endpoint.
