Description
This commit introduces some new API to the ExtendedCamelContext which is fine but in order to reduce the APIs we could evaluate to extend the functionalities of the context through the extension mechanism, i.e. the same functionality of the commit could be implemented as:
context.getExtension(RestBindingJaxbDataFormatFactory.class) ifPresent(extensions -> extension.setupJaxb(...))
Extension can then be discovered through:
- internal-cache
- registry
- factory finder (file)
We can use a class name convention for the factory file:
META-INF/services/org/apache/camel/services/RestBindingJaxbDataFormatFactory
or
META-INF/services/org/apache/camel/services/rest-binding-jaxb-dataormat-factory