@Override public void schedule(String jobId, ByteSequence payload, long delay) throws Exception { JobScheduler js = this.broker.getInternalScheduler(); if (js != null) { js.schedule(jobId, payload, delay); } }
@Override public void remove(long time) throws Exception { JobScheduler js = this.broker.getInternalScheduler(); if (js != null) { js.remove(time); } }
@Override public void removeListener(JobListener l) throws Exception { JobScheduler js = this.broker.getInternalScheduler(); if (js != null) { js.removeListener(l); } }
public static void validate(final String cronEntry) throws MessageFormatException { List<String> list = tokenize(cronEntry); List<CronEntry> entries = buildCronEntries(list); for (CronEntry e : entries) { validate(e); } }
protected synchronized JobScheduler getInternalScheduler() throws Exception { if (this.started.get()) { if (this.scheduler == null && store != null) { this.scheduler = store.getJobScheduler("JMS"); this.scheduler.addListener(this); this.scheduler.startDispatching(); } return this.scheduler; } return null; }
@Override public void removeAllJobs() throws Exception { JobScheduler js = this.broker.getInternalScheduler(); if (js != null) { js.removeAllJobs(); } }
@Override public String getName() throws Exception { JobScheduler js = this.broker.getInternalScheduler(); if (js != null) { return js.getName(); } return ""; }
@Override public String getNextScheduleTime() throws Exception { long time = this.jobScheduler.getNextScheduleTime(); return JobSupport.getDateTime(time); }
@Override public void addListener(JobListener l) throws Exception { JobScheduler js = this.broker.getInternalScheduler(); if (js != null) { js.addListener(l); } }
@Override public long getNextScheduleTime() throws Exception { JobScheduler js = this.broker.getInternalScheduler(); if (js != null) { return js.getNextScheduleTime(); } return 0; }
@Override public List<Job> getAllJobs() throws Exception { JobScheduler js = this.broker.getInternalScheduler(); if (js != null) { return js.getAllJobs(); } return Collections.emptyList(); }
@Override public List<Job> getNextScheduleJobs() throws Exception { JobScheduler js = this.broker.getInternalScheduler(); if (js != null) { return js.getNextScheduleJobs(); } return Collections.emptyList(); }
@Override public void startDispatching() throws Exception { JobScheduler js = this.broker.getInternalScheduler(); if (js != null) { js.startDispatching(); } }
@Override public void removeAllJobsAtScheduledTime(String time) throws Exception { long removeAtTime = JobSupport.getDataTime(time); this.jobScheduler.remove(removeAtTime); }
@Override public void removeAllJobs(String startTime, String finishTime) throws Exception { long start = JobSupport.getDataTime(startTime); long finish = JobSupport.getDataTime(finishTime); this.jobScheduler.removeAllJobs(start, finish); }
@Override public void stopDispatching() throws Exception { JobScheduler js = this.broker.getInternalScheduler(); if (js != null) { js.stopDispatching(); } } }
@Override public void schedule(String jobId, ByteSequence payload, String cronEntry) throws Exception { JobScheduler js = this.broker.getInternalScheduler(); if (js != null) { js.schedule(jobId, payload, cronEntry); } }
@Override public void remove(String jobId) throws Exception { JobScheduler js = this.broker.getInternalScheduler(); if (js != null) { js.remove(jobId); } }
@Override public void removeAllJobs(long start, long finish) throws Exception { JobScheduler js = this.broker.getInternalScheduler(); if (js != null) { js.removeAllJobs(start, finish); } }
@Override public void schedule(String jobId, ByteSequence payload, String cronEntry, long start, long period, int repeat) throws Exception { JobScheduler js = this.broker.getInternalScheduler(); if (js != null) { js.schedule(jobId, payload, cronEntry, start, period, repeat); } }