You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Luca Burgazzoli (Jira)" <ji...@apache.org> on 2020/04/01 10:55:00 UTC

[jira] [Updated] (CAMEL-14824) Extend Camel Context functionnalities through the Extension mechanism

     [ https://issues.apache.org/jira/browse/CAMEL-14824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luca Burgazzoli updated CAMEL-14824:
------------------------------------
    Description: 
[This commit |https://github.com/apache/camel/commit/0f8ad1a3a42f1f50e863a8b2ff092cd6df3df43b] 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:

{code:java}
    context.getExtension(RestBindingJaxbDataFormatFactory.class)
        ifPresent(extensions -> extension.setupJaxb(...))
{code}

Extension can then be discovered through:

# internal-cache
# registry
# factory finder (file)

We can use a class name convention for the factory file:

{code}
     META-INF/services/org/apache/camel/services/RestBindingJaxbDataFormatFactory
{code}

or

{code}  
    META-INF/services/org/apache/camel/services/rest-binding-jaxb-dataormat-factory
{code}



  was:
[This commit |https://github.com/apache/camel/commit/0f8ad1a3a42f1f50e863a8b2ff092cd6df3df43b] 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:

{code,java}
    context.getExtension(RestBindingJaxbDataFormatFactory.class)
        ifPresent(extensions -> extension.setupJaxb(...))
{code}

Extension can then be discovered through:

# internal-cache
# registry
# factory finder (file)

We can use a class name convention for the factory file:

{code}
     META-INF/services/org/apache/camel/services/RestBindingJaxbDataFormatFactory
{code}

or

{code}  
    META-INF/services/org/apache/camel/services/rest-binding-jaxb-dataormat-factory
{code}




> Extend Camel Context functionnalities through the Extension mechanism 
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-14824
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14824
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core-engine
>            Reporter: Luca Burgazzoli
>            Priority: Minor
>             Fix For: 3.x
>
>
> [This commit |https://github.com/apache/camel/commit/0f8ad1a3a42f1f50e863a8b2ff092cd6df3df43b] 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:
> {code:java}
>     context.getExtension(RestBindingJaxbDataFormatFactory.class)
>         ifPresent(extensions -> extension.setupJaxb(...))
> {code}
> Extension can then be discovered through:
> # internal-cache
> # registry
> # factory finder (file)
> We can use a class name convention for the factory file:
> {code}
>      META-INF/services/org/apache/camel/services/RestBindingJaxbDataFormatFactory
> {code}
> or
> {code}  
>     META-INF/services/org/apache/camel/services/rest-binding-jaxb-dataormat-factory
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)