Hi,
in using the cornerstone scheduler block, the following useful enhancements spring to mind:
1. PeriodicTimeTrigger - it would be useful to have a constructor with which to
specify the trigger time directly, as a oneoff triggered event. At present, this can be done by calculating the offset from the trigger time and the current time
and using -1 as the period. The triggerTime variable is already used privately by the class, so I ask if there was any
reason not to expose the constructor to set it.
Perhaps, one might argue that it make it a non-periodic trigger any more and it should
be implemented in a separate TimeTrigger, but I'd be more inclined to consider it a specific case of
PeriodicTimeTrigger.
2. TimeScheduler - how about adding to the interface methods to manage the list of Triggers that have
already been added, eg
public String[] getTriggerNames();
so that one can check what has been added already. Also, some method that return the information about the trigger
There already is a method
private TimeScheduleEntry getEntry(String name);
that could be made public - but TimeScheduledEntry should be promoted to the public class in services.scheduler.
Any thoughts? If there are no design objections I could implement the enhancements and send in a patch.
The PeriodicTimeTrigger could also do with enhanced javadocs.
Cheers, Mauro
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
