|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.sree.schedule.TimeCondition
public class TimeCondition
TimeCondition is time based schedule condition. It's possible to specify time in a number of different formats: exact time and day, day of month, day of week, and week of month. Time condition and be repeating condition (other than exact time and day). If a time condition is declared to be repeating, the associated task will be rescheduled at the next cycle after it's run.
| Field Summary | |
|---|---|
static int |
AT
Time condition type for exact time. |
static int |
DAY_OF_MONTH
Time condition type for day of month. |
static int |
DAY_OF_WEEK
Time condition type for day of week. |
static int |
EVERY_DAY
Time condition type for every day. |
static int |
EVERY_HOUR
Hour condition type for every month. |
static int |
EVERY_MONTH
Time condition type for every month. |
static int |
EVERY_WEEK
Time condition type for every week. |
static int |
LAST_DAY_OF_MONTH
Last day of a month. |
static int |
WEEK_OF_MONTH
Time condition type for week of month. |
static int |
WEEK_OF_YEAR
Time condition type for week of year. |
| Constructor Summary | |
|---|---|
TimeCondition()
Create a default time condition. |
|
| Method Summary | |
|---|---|
static TimeCondition |
at(Date time)
Create a time condition at exact time and date. |
static TimeCondition |
at(int hour,
int minute,
int second)
Create a time condition at specified time everyday. |
static TimeCondition |
atDayOfMonth(int day_of_month,
int hour,
int minute,
int second)
Create a time condition at day of month. |
static TimeCondition |
atDayOfWeek(int day_of_week,
int hour,
int minute,
int second)
Create a time condition at day of week. |
static TimeCondition |
atDaysOfWeek(int[] days_of_week,
int hour,
int minute,
int second)
Create a time condition at days of week. |
static TimeCondition |
atHours(int[] days_of_week,
int hour,
int minute,
int second)
Create a time condition at hours. |
static TimeCondition |
atWeekOfMonth(int week_of_month,
int day_of_week,
int hour,
int minute,
int second)
Create a time condition at week of month. |
static TimeCondition |
atWeekOfYear(int week_of_year,
int day_of_week,
int hour,
int minute,
int second)
Create a time condition at week of year. |
boolean |
check(long curr)
Check the condition. |
protected boolean |
containsIn(int[] arr,
int n)
Check if the array contains the specified element. |
boolean |
equals(Object val)
|
Date |
getDate()
Get the specified time and day. |
int |
getDayOfMonth()
Get day of month. |
int |
getDayOfWeek()
Get day of week. |
int[] |
getDaysOfWeek()
Get days of week. |
int |
getHour()
Get hour of day. |
protected int |
getHour(int hour,
int diff)
Get the hour. |
int |
getHourEnd()
Get end hour of day. |
float |
getHourlyInterval()
Get the interval of hour. |
protected int |
getHourOffset()
|
int |
getInterval()
Get the interval. |
int |
getMinute()
Get minute. |
int |
getMinuteEnd()
Get end minute. |
protected String |
getMonthName(int month)
Get the text month name. |
int[] |
getMonthsOfYear()
Get months of year. |
long |
getRetryTime(long curr)
Get the next time to retry the condition. |
int |
getSecond()
Get second. |
int |
getSecondEnd()
Get end second. |
TimeZone |
getTimeZone()
Get the time zone of this time condition. |
int |
getType()
Get type of this condition. |
protected String |
getWeekDayName(int day)
Get the text week day name. |
int |
getWeekOfMonth()
Get week of month. |
int |
getWeekOfYear()
Get week of year. |
boolean |
isWeekdayOnly()
Get if the condition would be skipped if the day is not weekday. |
void |
parseXML(Element tag)
Parse itself from an xml file. |
void |
setDate(Date date)
Sets the date and time at which the task should be executed. |
void |
setDayOfMonth(int dayOfMonth)
Sets the day of the month on which the task should be executed. |
void |
setDayOfWeek(int dayOfWeek)
Sets the week day on which the task should be executed. |
void |
setDaysOfWeek(int[] days_of_week)
Set days of week. |
void |
setHour(int hour)
Sets the hour of the day at which the task should be executed. |
void |
setHourEnd(int hour)
Sets the end hour of the day at which the task should be executed. |
void |
setHourlyInterval(float hourlyInterval)
Set the interval of hour to repeat the condition. |
void |
setInterval(int interval)
Set the interval of days or weeks to repeat the condition. |
void |
setMinute(int minute)
Sets the minute of the hour at which the task should be executed. |
void |
setMinuteEnd(int minute)
Sets the end minute of the hour at which the task should be executed. |
void |
setMonthsOfYear(int[] months_of_year)
Set months of year. |
void |
setSecond(int second)
Sets the second at which the task should be executed. |
void |
setSecondEnd(int second)
Sets the end second at which the task should be executed. |
void |
setTimeZone(TimeZone tz)
Set the timezone of this server. |
void |
setType(int type)
Sets the type of this condition. |
void |
setWeekdayOnly(boolean weekdayOnly)
Set if the condition should be skipped if the day is Saturday or Sunday. |
void |
setWeekOfMonth(int weekOfMonth)
Sets the week of the month in which the task should be executed. |
void |
setWeekOfYear(int weekOfYear)
Sets the week of the year in which the task should be executed. |
String |
toString()
|
protected void |
writeAttributes(PrintWriter writer)
|
void |
writeXML(PrintWriter writer)
Write itself to an xml file. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int AT
public static final int EVERY_DAY
public static final int DAY_OF_MONTH
public static final int DAY_OF_WEEK
public static final int WEEK_OF_MONTH
public static final int WEEK_OF_YEAR
public static final int EVERY_WEEK
public static final int EVERY_MONTH
public static final int EVERY_HOUR
public static final int LAST_DAY_OF_MONTH
| Constructor Detail |
|---|
public TimeCondition()
| Method Detail |
|---|
public int getType()
public void setType(int type)
type - the condition type.public static TimeCondition at(Date time)
time - date and time of this condition.
public static TimeCondition at(int hour,
int minute,
int second)
hour - hour of day.minute - minute in the hour.second - second in the minute.
public static TimeCondition atDayOfMonth(int day_of_month,
int hour,
int minute,
int second)
day_of_month - day of month.hour - hour of day.minute - minute in the hour.second - second in the minute.
public static TimeCondition atDayOfWeek(int day_of_week,
int hour,
int minute,
int second)
day_of_week - day of week.hour - hour of day.minute - minute in the hour.second - second in the minute.
public static TimeCondition atDaysOfWeek(int[] days_of_week,
int hour,
int minute,
int second)
days_of_week - day of week.hour - hour of day.minute - minute in the hour.second - second in the minute.
public static TimeCondition atHours(int[] days_of_week,
int hour,
int minute,
int second)
days_of_week - day of week.hour - hour of day.minute - minute in the hour.second - second in the minute.
public static TimeCondition atWeekOfMonth(int week_of_month,
int day_of_week,
int hour,
int minute,
int second)
week_of_month - week of month.day_of_week - day of week.hour - hour of day.minute - minute in the hour.second - second in the minute.
public static TimeCondition atWeekOfYear(int week_of_year,
int day_of_week,
int hour,
int minute,
int second)
week_of_year - week of year.day_of_week - day of week.hour - hour of day.minute - minute in the hour.second - second in the minute.public void setTimeZone(TimeZone tz)
tz - time zone.public TimeZone getTimeZone()
public boolean check(long curr)
check in interface ScheduleConditioncurr - current time.
public long getRetryTime(long curr)
getRetryTime in interface ScheduleConditioncurr - current time.
public String toString()
toString in class Objectpublic Date getDate()
public void setDate(Date date)
date - the date and time.public int getDayOfMonth()
public void setDayOfMonth(int dayOfMonth)
dayOfMonth - the day of the month.public int getDayOfWeek()
public void setDayOfWeek(int dayOfWeek)
dayOfWeek - the week day.public int getWeekOfMonth()
public void setWeekOfMonth(int weekOfMonth)
weekOfMonth - the week of the month.public int getWeekOfYear()
public void setWeekOfYear(int weekOfYear)
weekOfYear - the week of the year.public int getHour()
public void setHour(int hour)
hour - the hour of the day.public int getMinute()
public void setMinute(int minute)
minute - the minute of the hour.public int getSecond()
public void setSecond(int second)
second - the second value.public int getHourEnd()
public void setHourEnd(int hour)
hour - the end hour of the day.public int getMinuteEnd()
public void setMinuteEnd(int minute)
minute - the end minute of the hour.public int getSecondEnd()
public void setSecondEnd(int second)
second - the end second value.public int getInterval()
public void setInterval(int interval)
public float getHourlyInterval()
public void setHourlyInterval(float hourlyInterval)
public boolean isWeekdayOnly()
public void setWeekdayOnly(boolean weekdayOnly)
public int[] getDaysOfWeek()
public void setDaysOfWeek(int[] days_of_week)
public int[] getMonthsOfYear()
public void setMonthsOfYear(int[] months_of_year)
protected int getHour(int hour,
int diff)
public void writeXML(PrintWriter writer)
writeXML in interface inetsoft.util.XMLSerializableprotected int getHourOffset()
protected void writeAttributes(PrintWriter writer)
public void parseXML(Element tag)
throws Exception
parseXML in interface inetsoft.util.XMLSerializableExceptionprotected String getWeekDayName(int day)
day - day of week.protected String getMonthName(int month)
month - month of year.public boolean equals(Object val)
equals in class Object
protected boolean containsIn(int[] arr,
int n)
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||