[seam-dev] Seam Cron API for scheduled .... things

Pete Royle howardmoon at screamingcoder.com
Thu May 12 20:53:56 EDT 2011


Shane mentioned Task and Action, of which we both prefer Action.

I also just thought of Trigger and Notification.

Pete R


George Gastaldi wrote:
> I suggest adding a java.util.concurrent.TimeUnit attribute to @Every
> annotation and stick to CronEvent naming standard.
>
> 2011/5/12 Pete Royle <howardmoon at screamingcoder.com>:
>   
>> 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
>>
>> _______________________________________________
>> seam-dev mailing list
>> seam-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>
>>
>>     


More information about the seam-dev mailing list