java.lang.Object
org.media.mn8.util.cron.CronTrigger
- All Implemented Interfaces:
- Trigger
- public class CronTrigger
- extends java.lang.Object
- implements Trigger
|
Constructor Summary |
CronTrigger(int minute,
int hour,
int day,
int month,
int year,
boolean isDayOfWeek)
Constructor for Cron. |
|
Method Summary |
long |
getTimeAfter(long time)
Retrieve the next time at which this trigger activates. |
void |
reset()
Reset the cron-trigger. |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
m_minute
protected final int m_minute
m_hour
protected final int m_hour
m_dayOfMonth
protected final int m_dayOfMonth
m_month
protected final int m_month
m_dayOfWeek
protected final int m_dayOfWeek
m_year
protected final int m_year
CronTrigger
public CronTrigger(int minute,
int hour,
int day,
int month,
int year,
boolean isDayOfWeek)
- Constructor for Cron.
Day is either day of week or day of month depending on value of isDayOfWeek.
if (isDayOfWeek == true) then valid values are 1-7 otherwise the values
are 1-31
getTimeAfter
public long getTimeAfter(long time)
- Retrieve the next time at which this trigger activates.
- Specified by:
getTimeAfter in interface Trigger
reset
public void reset()
- Reset the cron-trigger.
- Specified by:
reset in interface Trigger
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object
- Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method
never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string
concatenation with this object. If the result is
null, string concatenation will instead
use "null".
The default implementation returns
getClass().getName() + "@" +
Integer.toHexString(hashCode()).