I've just pushed a working test case: https://github.com/apache/camel/blob/bcaa3ce64d9f1a5fd2ee9fcb154c7a2682c9979e/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeCharsetTest.java#L57-L59
It's missing the generation of the dsl methods for each endpoint consumer / producer (see https://github.com/apache/camel/blob/bcaa3ce64d9f1a5fd2ee9fcb154c7a2682c9979e/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeCharsetTest.java#L64-L69) but I'm not sure yet where/how to nicely plug them in the DSL. Ideas and feedback welcome ! Le mer. 5 juin 2019 à 23:23, Guillaume Nodet <[email protected]> a écrit : > I just pushed a branch called "endpoint-dsl". > > My goal is to experiment with an auto-generated DSL for endpoints, mainly > to have a complete and type-safe java DSL for endpoints instead of using > URI containing all the parameters. Right now, it compiles but isn't really > usable at a DSL. > I'll get back as soon as I have something which can actually be used so > that we can discuss further various options. > My rough goal is to be able to write something like: > > from(file("target/data/foo").delay(4000).backoffMultiplier(4 > ).backoffIdleThreshold(2).backoffErrorThreshold(3)) > .to(mock("result")) > > instead of > > from( > "file://target/data/foo?delay=4000&backoffMultiplier=4&backoffIdleThreshold=2&backoffErrorThreshold=3" > ) > .to("mock:result") > > Stay tuned ! > > -- > ------------------------ > Guillaume Nodet > > -- ------------------------ Guillaume Nodet
