[seam-dev] Seam Cron API for scheduled .... things
Pete Royle
howardmoon at screamingcoder.com
Thu May 12 20:00:01 EDT 2011
Hi All,
Having trouble deciding on something. Originally observer methods for
scheduled events were quite readable and intuitive, eg:
public void doStuff(@Observes @Scheduled("10:00") Event e) { ... }
However, due to possible confusion between
org.jboss.seam.cron.events.Event and javax.enterprise.event.Event Event
was renamed to CronEvent. This is fine, but I wonder if there's any
better options. Viable options I've thought of so far include:
@Observes @Scheduled("10:00") CronEvent ce
@Observes @Scheduled("10:00") Instant i
@Observes @Scheduled("10:00") Moment m
@Observes @Scheduled("10:00") Tick t
@Observes @Scheduled("10:00") Occurrence o
@Observes @Scheduled("10:00") Appointment a
Or maybe go for something different like:
@Observes @At("10:00") Schedule s
@Observes @Recurring("10:00") Schedule s
I figured since this is going to be the most used part of the API I
would throw it out there for discussion and to see if there are any
better ideas out there.
It's probably worth mentioining that another part of the API looks like
this:
@Observes @Every Second s
@Observes @Every Minute m
@Observes @Every Hour h
Thanks for the feedback.
Pete R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/seam-dev/attachments/20110513/223da9ec/attachment.html
More information about the seam-dev
mailing list