Hi guys There is a module in Karaf named scheduler. It's a simple scheduler implemented using java.util.Timer, contains only 4 classes and registers a TaskScheduler service manually. There is no dependency to this module in Karaf.
Here is my questions: 1. Why this module registers its only service (TaskScheduler) manually in Activator class (not using blueprint.xml like other modules) and the service has no interface (just the implementation class)? I Don't know whether this is intentional or not! If there is some reasons behind this design, what are they and if it has been designed this way just because its an old module, is it possible to refactor it and make it consistent with other modules? 2. Why there isn't any command to interact with scheduler? The scheduler bundle have a ServiceListener which listens for any changes in services and if a service class is an instance of Runnable (that means it's a Thread), adds it to the list of task schedulers and tries to run it in given time periods. So there is no way to stop a repetitive task other than undeploying the service implementing it. Also it seems that it would be reasonable to have an option to change the repeating pattern or pause it and etc. I Think we can have a command module to implement these options and let the user to have more control over the scheduler. I've tried to implement such command and I like to know your ideas about this topic before finalizing implementation. Regards. ----- E.Z.Moghaddam [email protected] -- View this message in context: http://karaf.922171.n3.nabble.com/Having-commands-for-scheduler-module-tp4030991.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
