[
https://issues.apache.org/jira/browse/CAMEL-14672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17060742#comment-17060742
]
Luca Burgazzoli edited comment on CAMEL-14672 at 3/17/20, 9:07 AM:
-------------------------------------------------------------------
I think we can have a ComponentCustomizer without generic and some
helper/default methods like
{code:java}
ComponentCustomizer
.withComponent(S3Component.class)
.apply(target -> target.setSomething(...));
ComponentCustomizer
.withCondition(target -> target instanceOf SSLContextParametersAware)
.apply(target ->
target.retrieveGlobalSslContextParameters().setSomething(...));
{code}
so type checking/condition evaluation is done under the hoods but the user is
free to have a generic customizer that applies to everithing
was (Author: lb):
I think we can have a ComponentCustomizer without generic and some
helper/default methods like
{code:java}
ComponentCustomizer.withComponent(S3Component.class).apply(target ->
target.setSomething(...));
ComponentCustomizer.withCondition(target -> target instanceOf
SSLContextParametersAware).apply(target ->
target.retrieveGlobalSslContextParameters().setSomething(...));
{code}
so type checking/condition evaluation is done under the hoods but the user is
free to have a generic customizer that applies to everithing
> 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: Major
> 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)