|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.oddjob.schedules.ScheduleContext
public class ScheduleContext
A schedule context provides a context for the evaluation of a schedules next due interval.
Constructor Summary | |
---|---|
ScheduleContext(Date now)
Constructor for a new context with a date to evaluate from, and using the default time zone. |
|
ScheduleContext(Date use,
TimeZone timeZone)
Constructor for a new context with a date to evaluate from, and a time zone to evaluate the schedule with. |
|
ScheduleContext(Date now,
TimeZone timeZone,
Map<Object,Object> data)
Constructor with a data map. |
|
ScheduleContext(Date now,
TimeZone timeZone,
Map<Object,Object> data,
Interval parentInterval)
Constructor with a data map. |
Method Summary | |
---|---|
Object |
getData(Object key)
Get data back from the context data map. |
Date |
getDate()
Get the date to evaluate the schedule with. |
Interval |
getParentInterval()
The parent interval will be defined by a schedule and passed to it's child. |
TimeZone |
getTimeZone()
Get the time zone to evaluate the schdule in. |
ScheduleContext |
move(Date date)
Moves the existing context to one for a new date. |
void |
putData(Object key,
Object value)
Add data to the context data map. |
ScheduleContext |
spawn(Date date,
Interval parentInterval)
Create a new context from the existing one for a new parent interval and with an new context date. |
ScheduleContext |
spawn(Interval parentInterval)
Create a new context with the existing time zone and data map, but a new parent interval. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ScheduleContext(Date now)
now
- The date to evaluate from.public ScheduleContext(Date use, TimeZone timeZone)
use
- The date to evaluate from.timeZone
- The time zone.public ScheduleContext(Date now, TimeZone timeZone, Map<Object,Object> data)
now
- The date to evaluate from. A null date is allowed
and means the schedule will never be due.timeZone
- The time zone.data
- The data map.public ScheduleContext(Date now, TimeZone timeZone, Map<Object,Object> data, Interval parentInterval)
now
- The date to evaluate from. A null date is allowed
and means the schedule will never be due.timeZone
- The time zone.data
- The data map.Method Detail |
---|
public Date getDate()
public TimeZone getTimeZone()
public void putData(Object key, Object value)
key
- The key.value
- The value.public Object getData(Object key)
key
- The key.
public Interval getParentInterval()
public ScheduleContext spawn(Interval parentInterval)
parentInterval
- The new constraining parent interval.
public ScheduleContext spawn(Date date, Interval parentInterval)
date
- The next date.parentInterval
- The new constraining parent interval.
public ScheduleContext move(Date date)
date
- The date to shift the context to.
public String toString()
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |