|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.java.util.jobs.scheduling.JobExecutionInterval
Represents an interval for a repeated automatic execution of an
IJob within the JobManager scheduler context.
| Field Summary | |
static JobExecutionInterval |
APPLICATION_STARTUP
Default interval of 1 (execution at application startup) |
static JobExecutionInterval[] |
DEFAULT_INTERVALS
The predefined intervals |
static JobExecutionInterval |
EIGHT_HOURS
Default interval of 8 hours |
static JobExecutionInterval |
FIFTEEN_MINUTES
Default interval of 15 minutes |
static JobExecutionInterval |
FIVE_MINUTES
Default interval of 5 minutes |
static JobExecutionInterval |
FOUR_HOURS
Default interval of 4 hours |
static JobExecutionInterval |
FOUR_MINUTES
Default interval of 4 minutes |
private String |
localizedPeriod
The localized textual representation of a period |
static JobExecutionInterval |
NO_EXECUTION
Default interval of zero (no execution) |
static JobExecutionInterval |
ONE_DAY
Default interval of 1 day |
static JobExecutionInterval |
ONE_HOUR
Default interval of 1 hour |
static JobExecutionInterval |
ONE_MINUTE
Default interval of 1 minute |
static JobExecutionInterval |
ONE_WEEK
Default interval of 1 week |
private long |
period
The period in milliseconds that separates executions of an IJob.
|
static JobExecutionInterval |
TEN_MINUTES
Default interval of 10 minutes |
static JobExecutionInterval |
THIRTY_MINUTES
Default interval of 30 minutes |
static JobExecutionInterval |
THREE_MINUTES
Default interval of 3 minutes |
static JobExecutionInterval |
TWELVE_HOURS
Default interval of 12 hours |
static JobExecutionInterval |
TWO_HOURS
Default interval of 2 hours |
static JobExecutionInterval |
TWO_MINUTES
Default interval of 2 minutes |
| Constructor Summary | |
JobExecutionInterval(long period)
Creates a new JobExceutionInterval.
|
|
| Method Summary | |
void |
defaultLanguageChanged(LanguageResourceChangeEvent lrce)
Called whenever the configured default language changed. |
protected void |
finalize()
Fianlizes this JobExecutionInterval instance.
|
static JobExecutionInterval |
getInterval(long period)
Gets the JobExecutionInterval that matches the specified
period. |
String |
getLocalizedPeriod()
Gets the localized textual representation of the currently set period as returned by the getPeriod() method, e.g. "5 minutes".
|
long |
getPeriod()
Gets the period in milliseconds that separates subsequent executions of an IJob.
|
private void |
initializeLocalizedPeriod()
Initializes the localized textual representation of the currently set period as returned by the getPeriod() method, e.g. "5 minutes".
|
void |
setPeriod(long period)
Sets the period in milliseconds that separates subsequent executions of an IJob.
|
String |
toString()
Gets the textual representation of this JobExecutionInterval
instance. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final JobExecutionInterval NO_EXECUTION
Default interval of zero (no execution)
public static final JobExecutionInterval APPLICATION_STARTUP
Default interval of 1 (execution at application startup)
public static final JobExecutionInterval ONE_MINUTE
Default interval of 1 minute
public static final JobExecutionInterval TWO_MINUTES
Default interval of 2 minutes
public static final JobExecutionInterval THREE_MINUTES
Default interval of 3 minutes
public static final JobExecutionInterval FOUR_MINUTES
Default interval of 4 minutes
public static final JobExecutionInterval FIVE_MINUTES
Default interval of 5 minutes
public static final JobExecutionInterval TEN_MINUTES
Default interval of 10 minutes
public static final JobExecutionInterval FIFTEEN_MINUTES
Default interval of 15 minutes
public static final JobExecutionInterval THIRTY_MINUTES
Default interval of 30 minutes
public static final JobExecutionInterval ONE_HOUR
Default interval of 1 hour
public static final JobExecutionInterval TWO_HOURS
Default interval of 2 hours
public static final JobExecutionInterval FOUR_HOURS
Default interval of 4 hours
public static final JobExecutionInterval EIGHT_HOURS
Default interval of 8 hours
public static final JobExecutionInterval TWELVE_HOURS
Default interval of 12 hours
public static final JobExecutionInterval ONE_DAY
Default interval of 1 day
public static final JobExecutionInterval ONE_WEEK
Default interval of 1 week
public static final JobExecutionInterval[] DEFAULT_INTERVALS
The predefined intervals
private long period
The period in milliseconds that separates executions of an
IJob.
private String localizedPeriod
The localized textual representation of a period
| Constructor Detail |
public JobExecutionInterval(long period)
Creates a new JobExceutionInterval.
period - period the period in milliseconds that separates executions
of an IJob| Method Detail |
public void setPeriod(long period)
Sets the period in milliseconds that separates subsequent executions of
an IJob.
period - the period in milliseconds that separates subsequent
executions of an IJob
IllegalArgumentException - if a value less than zero is specified
for periodpublic long getPeriod()
Gets the period in milliseconds that separates subsequent executions of
an IJob.
IJobpublic String getLocalizedPeriod()
Gets the localized textual representation of the currently set period as
returned by the getPeriod() method, e.g. "5 minutes".
getPeriod() method, e.g. "5 minutes"public String toString()
Gets the textual representation of this JobExecutionInterval
instance. This method returns the localized textual representation of the
currently set period as returned by the getLocalizedPeriod()
method, e.g. "5 minutes".
JobExecutionInterval instancepublic void defaultLanguageChanged(LanguageResourceChangeEvent lrce)
Called whenever the configured default language changed.
This method reinitializes the localized period String.
defaultLanguageChanged in interface ILanguageResourceChangeListenerlrce - the triggered LanguageResourceChangeEventpublic static JobExecutionInterval getInterval(long period)
Gets the JobExecutionInterval that matches the specified
period. If none of the predefined
JobExecutionIntervals matches the specified
period the default NO_EXECUTION
JobExecutionInterval is returned.
period - the period to get the JobExecutionIntevral
for
JobExecutionInterval matching the specified
period
protected void finalize()
throws Throwable
Fianlizes this JobExecutionInterval instance.
Throwable - if an error occured during finalizationprivate void initializeLocalizedPeriod()
Initializes the localized textual representation of the currently set
period as returned by the getPeriod() method, e.g. "5 minutes".
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||