1 /* 2 * (c) Rob Gordon 2005 3 */ 4 package org.oddjob.scheduling; 5 6 7 /** 8 * Implementation are able to schedule jobs within the Oddjob framework. 9 * 10 * @author Rob Gordon. 11 */ 12 public interface OddjobScheduler { 13 14 15 /** 16 * Check if the given component can be scheduled. 17 * 18 * @param component The component 19 * @return True if it can, false if it can't. 20 */ 21 public boolean canSchedule(Object component); 22 23 /** 24 * Schedule using the given schedule instruction. 25 * 26 * @param scheduleInstruction The schedule instruction. 27 */ 28 public void schedule(ScheduleInstruction scheduleInstruction); 29 30 /** 31 * Unschedule the schedule specified with the given id. 32 * 33 * @param id. 34 */ 35 public void unSchedule(String id); 36 37 /** 38 * Return an array of ScheduleSummary objects for the given 39 * job. 40 * 41 * @param object The job ScheduleSummary information is required for. 42 * @return An array of schedule summary object. This will be an empty 43 * array if the job is not scheduled with this scheduler, but should 44 * never be null. 45 */ 46 public ScheduleSummary[] summariesFor(Object object); 47 48 49 } 50