Hi Kay

Welcome. Glad you enjoyed Bruce's presentation. I had the pleasure of attending 
his presentation at JavaPolis last year. 

That is a great idea to allow end-users to setup timing in a unit of choice. 
However Camel also supports setting options in the well known URI style (like 
http request parameters with ? and &). So if we could come up with a short hand 
syntax and a parser, so you can write: "deplay=5000ms", "delay=5s" for 5 
seconds. I was wondering if there was such a framework or feature already? It 
should also work with the Spring XSD configuration where you use XML.

But personally I love the builder pattern and I see something in common here 
with a DSL for scheduling, that we would like to get in Camel 2.0. Here you 
also need to express time units as well.

Kaj, please feel free to create a ticket on our JIRA for this good idea:
http://activemq.apache.org/camel/support.html

http://issues.apache.org/activemq/browse/CAMEL





Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: Kaj [mailto:[EMAIL PROTECTED] 
Sent: 23. oktober 2008 22:57
To: [email protected]
Subject: Small API change suggestion, TimeUnit


Hi all,

I just went to Bruce Snyder's presentation on Camel at Software Summit. It
was a great session, and it looks like Camel is really great, but I saw that
something could be made a bit better :)

Some methods in the API takes a time value. The time value is in
milliseconds, and some of the methods are named something like fooMs, while
some others only are named foo. 

Knowing how much 24000 ms is isn't the easiest thing. Why not overload the
metods, or change the API so that the methods instead takes a TimeUnit and a
value as argument. E.g. TimeUnit.MINUTES, 5.

(I didn't know if I should have posted this in the user list or the
developer list so I posted it here).

Kaj


-- 
View this message in context: 
http://www.nabble.com/Small-API-change-suggestion%2C-TimeUnit-tp20139112s22882p20139112.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to