it.sauronsoftware.cron4j
Interface TaskCollector


public interface TaskCollector

This interface describes a task collector. Task collectors can be registered in a Scheduler instance with the Scheduler.addTaskCollector(TaskCollector) method. Any registered task collector is queried by the scheduler once a minute. The developer has to implement the getTasks() method, returning a TaskTable whose elements has been collected with a custom logic. In example the list can be extracted from a database.

Since:
2.0
Author:
Carlo Pelliccia

Method Summary
 TaskTable getTasks()
          Once the instance has been registered on a Scheduler instance, with the Scheduler.addTaskCollector(TaskCollector) method, this method will be queried once a minute.
 

Method Detail

getTasks

TaskTable getTasks()
Once the instance has been registered on a Scheduler instance, with the Scheduler.addTaskCollector(TaskCollector) method, this method will be queried once a minute. It should return a custom TaskTable object. The scheduler instance will automatically iterate over the returned table elements, executing any task whose scheduling pattern is matching the current system time.

Returns:
The task table that will be automatically injected in the scheduler.