|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.sasl.common.schedule.QuartzSchedulerServiceAdapter
public class QuartzSchedulerServiceAdapter
Adapter class which delegates calls to
IScheduleService to
a Quartz scheduler.
The adapter has some restrictions and will only work as expected, if the
Quartz scheduler runs in a non clustered mode and uses a RAMJobStore. The
adapter needs some other helper classes to get the adaption work together
with Quartz.
| Field Summary | |
|---|---|
static String |
JOBMAP_CALLABLE_EXECUTION_STATUS_KEY
Name of the key in the job data map under which the execution status object is stored. |
static String |
JOBMAP_CALLABLE_INPUT_CALLABLE_KEY
Name of the key in the job data map under which the callable object is stored. |
| Constructor Summary | |
|---|---|
QuartzSchedulerServiceAdapter()
|
|
| Method Summary | ||
|---|---|---|
org.quartz.Scheduler |
getQuartzSchedulerService()
Returns the Quartz scheduler instance which will be used to schedule futures. |
|
|
schedule(Callable<V> callable,
long millis)
Tries to schedule the given callable over the setted Quartz scheduler. |
|
void |
setQuartzSchedulerService(org.quartz.Scheduler quartzSchedulerService)
Sets the a Quartz scheduler instance which will be used to schedule futures. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String JOBMAP_CALLABLE_INPUT_CALLABLE_KEY
public static final String JOBMAP_CALLABLE_EXECUTION_STATUS_KEY
| Constructor Detail |
|---|
public QuartzSchedulerServiceAdapter()
| Method Detail |
|---|
public <V> ScheduledFuture<V> schedule(Callable<V> callable,
long millis)
throws IllegalArgumentException
schedule in interface IScheduleServicecallable - non nullmillis - the amount of milliseconds from now at which the callable
should be executed in the future.
IllegalArgumentException - if callable is null or millis is lesser than 0.IScheduleService.schedule(java.util.concurrent.Callable,
long)
public void setQuartzSchedulerService(org.quartz.Scheduler quartzSchedulerService)
throws IllegalArgumentException
quartzSchedulerService - non null
IllegalArgumentException - if quartzSchedulerService is nullpublic org.quartz.Scheduler getQuartzSchedulerService()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||