[
https://issues.apache.org/jira/browse/CAMEL-10845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16900825#comment-16900825
]
Claus Ibsen edited comment on CAMEL-10845 at 8/6/19 10:15 AM:
--------------------------------------------------------------
I am adding suppliers so the DSL is a bit more modern with java 8 style.
For expression / predicate we should take a 2nd look as that would be cool.
Okay the enanced DSL on ExpressionClause get java 8 support for function,
supplier etc. So lets keep it for now.
was (Author: davsclaus):
I am adding suppliers so the DSL is a bit more modern with java 8 style.
For expression / predicate we should take a 2nd look as that would be cool.
> Java 8 DSL : add support for Suppliers
> --------------------------------------
>
> Key: CAMEL-10845
> URL: https://issues.apache.org/jira/browse/CAMEL-10845
> Project: Camel
> Issue Type: Improvement
> Components: camel-core, eip
> Reporter: Luca Burgazzoli
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 3.0.0
>
>
> One of the things that was missing in previous Java 8 DSL improvement rounds
> was the possibility to use Suppliers to provides objects to the routes.
> As today:
> {code:java}
> from("direct:start")
> .idempotentConsumer()
> .header("messageId")
> .messageIdRepository(createRepo())
> .to("mock:result");
> {code}
> With suppliers:
> {code:java}
> from("direct:start")
> .idempotentConsumer()
> .header("messageId")
> .messageIdRepository(this::createRepo)
> .to("mock:result");
> {code}
> Adding that does not result in such a big improvement for the DSL but it adds
> some overhead to the underlying definitions as we may need to add additional
> variables to hold the suppliers and other stuffs to convert suppliers i.e. to
> expression clause so we should have a look at this issue in Camel 3.0 (where
> we may have the chance to do a deeper refactor and suppliers may play better).
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)