[ 
https://issues.apache.org/jira/browse/CAMEL-14672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17053442#comment-17053442
 ] 

Luca Burgazzoli commented on CAMEL-14672:
-----------------------------------------

The same behaviour can be achieved by leverage 
_LifecycleStrategy::onComponentAdd_ but a dedicated interface would make it 
easier to customize components without having to deal with too many internals, 
as example once can then do something like:

{code:java}
@BindToRegistry
public static ComponentCustomizer<S3Component> s3Configurer() {
    return component -> component.setSomething(...);
}
{code}

> Invoke ComponentCustomizer as part of component initialization
> --------------------------------------------------------------
>
>                 Key: CAMEL-14672
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14672
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Luca Burgazzoli
>            Priority: Minor
>             Fix For: 3.2.0
>
>
> Camel has the concept of _ComponentCustomizer_ which is currently used only 
> by spring-boot starters and I wonder if we can make it a generic concept so 
> basically after configuring the component with properties, we should search 
> for customizers in the camel registry and apply them to the component itself.
> Examples:
> -  
> https://github.com/apache/camel-spring-boot/blob/master/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/EhcacheComponentAutoConfiguration.java
> - 
> https://github.com/apache/camel-spring-boot/blob/master/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/EhcacheComponentAutoConfiguration.java



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

Reply via email to