|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.bundle.JobletScheduler
public final class JobletScheduler
| Field Summary | |
|---|---|
static java.lang.String |
BUNDLE_NULL_STRING
The String that is internally used for grouping if a
Joblet is scheduled with a Bundle that is null. |
| Method Summary | |
|---|---|
void |
executeOnceNow(Bundle b,
java.lang.Class<? extends AbstractJoblet> j)
The Joblet with the given Class is executed once, for the
given Bundle. |
static JobletScheduler |
getInstance()
Returns the JobletScheduler singleton. |
java.util.Date |
getNextExecutionTime(Bundle b,
java.lang.Class<? extends AbstractJoblet> j,
java.lang.String ce)
Returns the Date of the next scheduled execution of the
Joblet scheduled with the given Bundle, Joblet
Class and cron expression String. |
java.util.Date |
getPreviousExecutionTime(Bundle b,
java.lang.Class<? extends AbstractJoblet> j,
java.lang.String ce)
Returns the Date of the previous scheduled execution of the
Joblet scheduled with the given Bundle, Joblet
Class and cron expression String. |
java.util.Map<Bundle,java.util.Map<java.lang.Class<? extends AbstractJoblet>,java.util.List<java.lang.String>>> |
getSchedules()
Returns a Collection holding all the currently scheduled
Joblets. |
java.util.Map<java.lang.Class<? extends AbstractJoblet>,java.util.List<java.lang.String>> |
getSchedules(Bundle b)
Returns a Collection holding all the Joblets, that are
currently scheduled for the given Bundle. |
java.util.List<java.lang.String> |
getSchedules(Bundle b,
java.lang.Class<? extends AbstractJoblet> j)
Returns a Collection holding all the cron expressions of the
Joblets with the given Class, that are currently
scheduled for the given Bundle. |
static boolean |
isPaused()
Checks whether the JobletScheduler singleton is paused. |
boolean |
isPaused(Bundle b,
java.lang.Class<? extends AbstractJoblet> j,
java.lang.String ce)
Checks whether the Joblet with the given Class is paused
for the given Bundle, with the given cron expression
String. |
boolean |
isScheduled(Bundle b,
java.lang.Class<? extends AbstractJoblet> j,
java.lang.String ce)
Checks whether the Joblet with the given Class is
scheduled for the given Bundle, with the given cron expression
String. |
static boolean |
isStarted()
Checks whether the JobletScheduler singleton has already been
started. |
static void |
pause()
Pauses the JobletScheduler singleton. |
void |
pause(Bundle b)
Pauses all the Joblets, that are currently scheduled for the
given Bundle. |
void |
pause(Bundle b,
java.lang.Class<? extends AbstractJoblet> j)
Pauses all the Joblets with the given Class, that are
currently scheduled for the given Bundle. |
void |
pause(Bundle b,
java.lang.Class<? extends AbstractJoblet> j,
java.lang.String ce)
Pauses the Joblet with the given Class, that is currently
scheduled for the given Bundle, with the given cron expression
String. |
void |
pauseAll()
Pauses all the currently scheduled Joblets. |
static void |
resume()
Resumes the JobletScheduler singleton. |
void |
resume(Bundle b)
Resumes all the Joblets, that are currently scheduled for the
given Bundle. |
void |
resume(Bundle b,
java.lang.Class<? extends AbstractJoblet> j)
Resumes all the Joblets with the given Class, that are
currently scheduled for the given Bundle. |
void |
resume(Bundle b,
java.lang.Class<? extends AbstractJoblet> j,
java.lang.String ce)
Resumes the Joblet with the given Class, that is
currently scheduled for the given Bundle, with the given cron
expression String. |
void |
resumeAll()
Resumes all the currently scheduled Joblets. |
void |
schedule(Bundle b,
java.lang.Class<? extends AbstractJoblet> j,
java.lang.String ce)
Schedules the Joblet with the given Class, for the given
Bundle, with the given cron expression String. |
static void |
startPaused(org.jdom.Element c)
Starts and pauses the JobletScheduler singleton. |
static void |
stop()
Stops the JobletScheduler singleton. |
void |
unschedule(Bundle b)
Unschedules all the Joblets, that are currently scheduled for the
given Bundle. |
void |
unschedule(Bundle b,
java.lang.Class<? extends AbstractJoblet> j)
Unschedules all the Joblets with the given Class, that
are currently scheduled for the given Bundle. |
void |
unschedule(Bundle b,
java.lang.Class<? extends AbstractJoblet> j,
java.lang.String ce)
Unschedules the Joblet with the given Class, that is
currently scheduled for the given Bundle, with the given cron
expression String. |
void |
unscheduleAll()
Unschedules all the currently scheduled Joblets. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String BUNDLE_NULL_STRING
String that is internally used for grouping if a
Joblet is scheduled with a Bundle that is null.
| Method Detail |
|---|
public static void startPaused(org.jdom.Element c)
throws JobletSchedulerException
JobletScheduler singleton.
c - a JDOM Element holding the configuration properties of
the JobletScheduler.
java.lang.IllegalStateException - if the JobletScheduler has already been started
JobletSchedulerException - if a SchedulerException is thrown by the underlying
quartz Scheduler.public static void stop()
JobletScheduler singleton.
java.lang.IllegalStateException - if the JobletScheduler has not yet been started
JobletSchedulerException - if a SchedulerException is thrown by the underlying
quartz Scheduler.public static void pause()
JobletScheduler singleton.
java.lang.IllegalStateException - if the JobletScheduler has not yet been started
JobletSchedulerException - if a SchedulerException is thrown by the underlying
quartz Scheduler.public static void resume()
JobletScheduler singleton.
java.lang.IllegalStateException - if the JobletScheduler has not yet been started
JobletSchedulerException - if a SchedulerException is thrown by the underlying
quartz Scheduler.public static boolean isStarted()
JobletScheduler singleton has already been
started.
true if the JobletScheduler has already been
started. Otherwise, return false.public static boolean isPaused()
JobletScheduler singleton is paused.
true if the JobletScheduler is paused. Otherwise,
return false.public static JobletScheduler getInstance()
JobletScheduler singleton.
JobletScheduler singleton.
java.lang.IllegalStateException - if the JobletScheduler has not yet been started.
public void executeOnceNow(Bundle b,
java.lang.Class<? extends AbstractJoblet> j)
Joblet with the given Class is executed once, for the
given Bundle.
b - the Bundle.j - the Joblet Class.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException.
public void schedule(Bundle b,
java.lang.Class<? extends AbstractJoblet> j,
java.lang.String ce)
Joblet with the given Class, for the given
Bundle, with the given cron expression String.
b - the Bundle.j - the Joblet Class.ce - the cron expression String.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException, or if a ParseException is
thrown when creating the CronTrigger.
public boolean isScheduled(Bundle b,
java.lang.Class<? extends AbstractJoblet> j,
java.lang.String ce)
Joblet with the given Class is
scheduled for the given Bundle, with the given cron expression
String.
b - the Bundle.j - the Joblet Class.ce - the cron expression String.
true if the Joblet with the given Class
is scheduled for the given Bundle , with the given cron
expression String. Otherwise, return false.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException.public java.util.Map<Bundle,java.util.Map<java.lang.Class<? extends AbstractJoblet>,java.util.List<java.lang.String>>> getSchedules()
Collection holding all the currently scheduled
Joblets.
Collection holding all the currently scheduled
Joblets.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException.public java.util.Map<java.lang.Class<? extends AbstractJoblet>,java.util.List<java.lang.String>> getSchedules(Bundle b)
Collection holding all the Joblets, that are
currently scheduled for the given Bundle.
b - the Bundle.
Collection holding all the Joblets, that are
currently scheduled for the given Bundle.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException.
public java.util.List<java.lang.String> getSchedules(Bundle b,
java.lang.Class<? extends AbstractJoblet> j)
Collection holding all the cron expressions of the
Joblets with the given Class, that are currently
scheduled for the given Bundle.
b - the Bundle.j - the Joblet Class.
Collection holding all the cron expressions of the
Joblets with the given Class, that are currently
scheduled for the given Bundle.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException.public void unscheduleAll()
Joblets.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException, or if a
ClassNotFoundException is thrown when instantiating
the Joblet(s).public void unschedule(Bundle b)
Joblets, that are currently scheduled for the
given Bundle.
b - the Bundle.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException, or if a
ClassNotFoundException is thrown when instantiating
the Joblet(s).
public void unschedule(Bundle b,
java.lang.Class<? extends AbstractJoblet> j)
Joblets with the given Class, that
are currently scheduled for the given Bundle.
b - the Bundle.j - the Joblet Class.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException.
public void unschedule(Bundle b,
java.lang.Class<? extends AbstractJoblet> j,
java.lang.String ce)
Joblet with the given Class, that is
currently scheduled for the given Bundle, with the given cron
expression String.
b - the Bundle.j - the Joblet Class.ce - the cron expression String.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException.public void pauseAll()
Joblets.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException, or if a
ClassNotFoundException is thrown when instantiating
the Joblet(s).public void pause(Bundle b)
Joblets, that are currently scheduled for the
given Bundle.
b - the Bundle.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException, or if a
ClassNotFoundException is thrown when instantiating
the Joblet(s).
public void pause(Bundle b,
java.lang.Class<? extends AbstractJoblet> j)
Joblets with the given Class, that are
currently scheduled for the given Bundle.
b - the Bundle.j - the Joblet Class.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException.
public void pause(Bundle b,
java.lang.Class<? extends AbstractJoblet> j,
java.lang.String ce)
Joblet with the given Class, that is currently
scheduled for the given Bundle, with the given cron expression
String.
b - the Bundle.j - the Joblet Class.ce - the cron expression String.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException.
public boolean isPaused(Bundle b,
java.lang.Class<? extends AbstractJoblet> j,
java.lang.String ce)
Joblet with the given Class is paused
for the given Bundle, with the given cron expression
String.
b - the Bundle.j - the Joblet Class.ce - the cron expression String.
true if the Joblet with the given Class
is paused for the given Bundle, with the given cron
expression String. Otherwise, return false.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException.public void resumeAll()
Joblets.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException, or if a
ClassNotFoundException is thrown when instantiating
the Joblet(s).public void resume(Bundle b)
Joblets, that are currently scheduled for the
given Bundle.
b - the Bundle.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException, or if a
ClassNotFoundException is thrown when instantiating
the Joblet(s).
public void resume(Bundle b,
java.lang.Class<? extends AbstractJoblet> j)
Joblets with the given Class, that are
currently scheduled for the given Bundle.
b - the Bundle.j - the Joblet Class.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException.
public void resume(Bundle b,
java.lang.Class<? extends AbstractJoblet> j,
java.lang.String ce)
Joblet with the given Class, that is
currently scheduled for the given Bundle, with the given cron
expression String.
b - the Bundle.j - the Joblet Class.ce - the cron expression String.
JobletSchedulerException - if the underlying quartz Scheduler throws a
SchedulerException.
public java.util.Date getPreviousExecutionTime(Bundle b,
java.lang.Class<? extends AbstractJoblet> j,
java.lang.String ce)
throws JobletSchedulerException
Date of the previous scheduled execution of the
Joblet scheduled with the given Bundle, Joblet
Class and cron expression String.
Returns null if no Joblet is scheduled with the given
arguments or if one is scheduled but has not yet been executed.
b - the Bundle the Joblet is scheduled withj - the Class of the scheduled Jobletce - the cron expression String the Joblet is
scheduled with
Date of the previous scheduled execution of the
Joblet scheduled with the given arguments or null
java.lang.IllegalArgumentException - if the name of the given Bundle is either
null or an empty String, if the given
Joblet Class is null, or if the given
cron expression String is either null or not
parsable into a valid CronExpression.
JobletSchedulerException - if a SchedulerException is thrown by the quartz
Scheduler
public java.util.Date getNextExecutionTime(Bundle b,
java.lang.Class<? extends AbstractJoblet> j,
java.lang.String ce)
throws JobletSchedulerException
Date of the next scheduled execution of the
Joblet scheduled with the given Bundle, Joblet
Class and cron expression String.
Returns null if no Joblet is scheduled with the given
arguments or if one is scheduled but will not be executed again.
b - the Bundle the Joblet is scheduled withj - the Class of the scheduled Jobletce - the cron expression String the Joblet is
scheduled with
Date of the next scheduled execution of the
Joblet scheduled with the given arguments or null
java.lang.IllegalArgumentException - if the name of the given Bundle is either
null or an empty String, if the given
Joblet Class is null, or if the given
cron expression String is either null or not
parsable into a valid CronExpression.
JobletSchedulerException - if a SchedulerException is thrown by the quartz
Scheduler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||