1 16 package org.apache.cocoon.components.cron; 17 18 import java.util.Date ; 19 import java.util.Map ; 20 import java.util.NoSuchElementException ; 21 22 import org.apache.avalon.framework.CascadingException; 23 import org.apache.avalon.framework.parameters.Parameters; 24 25 33 public interface JobScheduler { 34 35 String ROLE = JobScheduler.class.getName(); 36 37 42 String [] getJobNames(); 43 44 49 JobSchedulerEntry getJobSchedulerEntry(String jobname); 50 51 59 void addJob(String name, String jobrole, String schedulingExpression, boolean canRunConcurrently) 60 throws CascadingException; 61 62 72 void addJob(String name, String jobrole, String schedulingExpression, boolean canRunConcurrently, Parameters params, Map objects) 73 throws CascadingException; 74 75 84 void addJob(String name, Object job, String schedulingExpression, boolean canRunConcurrently) 85 throws CascadingException; 86 87 98 void addJob(String name, Object job, String schedulingExpression, boolean canRunConcurrently, Parameters params, Map objects) 99 throws CascadingException; 100 101 112 void addPeriodicJob(String name, String jobrole, long period, boolean canRunConcurrently, Parameters params, 113 Map objects) 114 throws CascadingException; 115 116 128 void addPeriodicJob(String name, Object job, long period, boolean canRunConcurrently, Parameters params, 129 Map objects) 130 throws CascadingException; 131 132 139 boolean fireJob(String jobrole); 140 141 149 boolean fireJob(Object job); 150 151 160 boolean fireJob(String jobrole, Parameters params, Map objects) 161 throws CascadingException; 162 163 173 boolean fireJob(Object job, Parameters params, Map objects) 174 throws CascadingException; 175 176 184 void fireJobAt(Date date, String name, String jobrole) 185 throws CascadingException; 186 187 197 void fireJobAt(Date date, String name, String jobrole, Parameters params, Map objects) 198 throws CascadingException; 199 200 209 void fireJobAt(Date date, String name, Object job) 210 throws CascadingException; 211 212 223 void fireJobAt(Date date, String name, Object job, Parameters params, Map objects) 224 throws CascadingException; 225 226 231 void removeJob(String name) 232 throws NoSuchElementException ; 233 } 234 | Popular Tags |