Protomatter Classes v1.1.6

com.protomatter.pas.cron
Class CronEntry

java.lang.Object
  |
  +--com.protomatter.pas.cron.CronEntry

public class CronEntry
extends java.lang.Object

A cron entry. This class encapsulates a PASEvent, a list of event topics and a specification for when the given event should be delivered to the given topics. The specification of when the event should be delivered is based on the UNIX cron facility.


Constructor Summary
CronEntry()
          Create an empty CronEntry.
 
Method Summary
 void addDay(int day)
          Add a day of the month to the list of years this entry applies to.
 void addHour(int hour)
          Add an hour to the list of years this entry applies to.
 void addMinute(int minute)
          Add a minute to the list of years this entry applies to.
 void addMonth(int month)
          Add a month to the list of years this entry applies to.
 void addTopic(java.lang.String topic)
          Add a topic to the list of topics this entry will submit it's event to.
 void addWeekday(int weekday)
          Add a weekday to the list of years this entry applies to.
 void addYear(int year)
          Add a year to the list of years this entry applies to.
 boolean appliesToDate(java.util.Date date)
          Determines if this CronEntry applies to the given date.
 PASEvent getEvent()
          Get this entry's event.
 java.util.Enumeration getTopics()
          Get the list of topics this entry will submit it's event to.
 void removeDay(int day)
          Remove a day of the month from the list of years this entry applies to.
 void removeHour(int hour)
          Remove an hour from the list of years this entry applies to.
 void removeMinute(int minute)
          Remove a minute from the list of years this entry applies to.
 void removeMonth(int month)
          Remove a month from the list of years this entry applies to.
 void removeTopic(java.lang.String topic)
          Remove a topic from the list of topics this entry will submit it's event to.
 void removeWeekday(int weekday)
          Remove a weekday from the list of years this entry applies to.
 void removeYear(int year)
          Remove a year from the list of years this entry applies to.
 void setAllDays(boolean set)
          Should the current day of the month be taken into consideration when deciding if this entry is applicable? If this is set to false (the default) then the values set with the addDay() and removeDay() are taken into consideration.
 void setAllHours(boolean set)
          Should the current hour be taken into consideration when deciding if this entry is applicable? If this is set to false (the default) then the values set with the addHour() and removeHour() are taken into consideration.
 void setAllMinutes(boolean set)
          Should the current minute be taken into consideration when deciding if this entry is applicable? If this is set to false (the default) then the values set with the addMinute() and removeMinute() are taken into consideration.
 void setAllMonths(boolean set)
          Should the current month be taken into consideration when deciding if this entry is applicable? If this is set to false (the default) then the values set with the addMonth() and removeMonth() are taken into consideration.
 void setAllWeekdays(boolean set)
          Should the current weekday be taken into consideration when deciding if this entry is applicable? If this is set to false (the default) then the values set with the addWeekday() and removeWeekday() are taken into consideration.
 void setAllYears(boolean set)
          Should the current year be taken into consideration when deciding if this entry is applicable? If this is set to false (the default) then the values set with the addYear() and removeYear() are taken into consideration.
 void setEvent(PASEvent event)
          Set this entry's event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CronEntry

public CronEntry()
Create an empty CronEntry.
Method Detail

appliesToDate

public boolean appliesToDate(java.util.Date date)
Determines if this CronEntry applies to the given date. Seconds and milliseconds in the date are ignored.

addYear

public void addYear(int year)
Add a year to the list of years this entry applies to.

removeYear

public void removeYear(int year)
Remove a year from the list of years this entry applies to.

setAllYears

public void setAllYears(boolean set)
Should the current year be taken into consideration when deciding if this entry is applicable? If this is set to false (the default) then the values set with the addYear() and removeYear() are taken into consideration. If this is set to true then the current year is not taken into consideration.

addMonth

public void addMonth(int month)
Add a month to the list of years this entry applies to. Month numbers are taken from the constants on the java.util.Calendar class.

removeMonth

public void removeMonth(int month)
Remove a month from the list of years this entry applies to. Month numbers are taken from the constants on the java.util.Calendar class.

setAllMonths

public void setAllMonths(boolean set)
Should the current month be taken into consideration when deciding if this entry is applicable? If this is set to false (the default) then the values set with the addMonth() and removeMonth() are taken into consideration. If this is set to true then the current month is not taken into consideration.

addDay

public void addDay(int day)
Add a day of the month to the list of years this entry applies to.

removeDay

public void removeDay(int day)
Remove a day of the month from the list of years this entry applies to.

setAllDays

public void setAllDays(boolean set)
Should the current day of the month be taken into consideration when deciding if this entry is applicable? If this is set to false (the default) then the values set with the addDay() and removeDay() are taken into consideration. If this is set to true then the current year is not taken into consideration.

addWeekday

public void addWeekday(int weekday)
Add a weekday to the list of years this entry applies to. Weekday numbers are taken from the constants on the java.util.Calendar class.

removeWeekday

public void removeWeekday(int weekday)
Remove a weekday from the list of years this entry applies to. Weekday numbers are taken from the constants on the java.util.Calendar class.

setAllWeekdays

public void setAllWeekdays(boolean set)
Should the current weekday be taken into consideration when deciding if this entry is applicable? If this is set to false (the default) then the values set with the addWeekday() and removeWeekday() are taken into consideration. If this is set to true then the current weekday is not taken into consideration.

addHour

public void addHour(int hour)
Add an hour to the list of years this entry applies to.

removeHour

public void removeHour(int hour)
Remove an hour from the list of years this entry applies to.

setAllHours

public void setAllHours(boolean set)
Should the current hour be taken into consideration when deciding if this entry is applicable? If this is set to false (the default) then the values set with the addHour() and removeHour() are taken into consideration. If this is set to true then the current hour is not taken into consideration.

addMinute

public void addMinute(int minute)
Add a minute to the list of years this entry applies to.

removeMinute

public void removeMinute(int minute)
Remove a minute from the list of years this entry applies to.

setAllMinutes

public void setAllMinutes(boolean set)
Should the current minute be taken into consideration when deciding if this entry is applicable? If this is set to false (the default) then the values set with the addMinute() and removeMinute() are taken into consideration. If this is set to true then the current minute is not taken into consideration.

addTopic

public void addTopic(java.lang.String topic)
Add a topic to the list of topics this entry will submit it's event to.

removeTopic

public void removeTopic(java.lang.String topic)
Remove a topic from the list of topics this entry will submit it's event to.

getTopics

public java.util.Enumeration getTopics()
Get the list of topics this entry will submit it's event to.

setEvent

public void setEvent(PASEvent event)
Set this entry's event.

getEvent

public PASEvent getEvent()
Get this entry's event.

Protomatter Classes v1.1.6
Copyright 1998-2001 Nate Sammons

Protomatter Classes v1.1.6 http://protomatter.sourceforge.net/1.1.6