Keel 2.1RC2

org.keel.services.schedule.quartz
Class QuartzScheduledRequestImpl

java.lang.Object
  extended byorg.keel.services.schedule.quartz.QuartzScheduledRequestImpl
All Implemented Interfaces:
QuartzScheduledRequest, ScheduledRequest

public class QuartzScheduledRequestImpl
extends java.lang.Object
implements QuartzScheduledRequest

This is the Quartz-specific implementation of a ScheduledRequest service

Version:
$Revision: 1.4 $ $Date: 2003/07/13 15:50:55 $
Author:
Michael Nash, Shash Chatterjee Created on Jan 26, 2003

Field Summary
private  java.lang.String daysOfMonth
           
private  java.lang.String daysOfWeek
           
private  java.lang.String hours
           
private  int idNumber
           
private  java.lang.String minutes
           
private  java.lang.String months
           
(package private)  int myPrio
           
private  ModelRequest myRequest
          The ModelRequest associated with this request
private  Trigger myTrigger
          The Quartz trigger associated with this request
private  int repeatInterval
           
private  int repeatparam
           
private  java.lang.Object runclass
           
private  java.lang.String seconds
           
private  boolean simplejob
           
private  java.lang.String years
           
 
Fields inherited from interface org.keel.services.schedule.ScheduledRequest
ROLE
 
Constructor Summary
QuartzScheduledRequestImpl()
           
 
Method Summary
 java.lang.String getExpression()
          Return the formatted CRON-tab expression that is the cumulative of the previously set seconds, minutes, hours, day-of-month/week, year fields
 java.util.Date getNextDate()
          Return a Date when this object is next scheduled to be run (if at all).
 int getNumber()
          Get the sequential request number provided by the scheduler when this task was scheduled
 int getRepeatInterval()
           
 int getRepeatParam()
           
 ModelRequest getRequest()
          Get the ModelRequest that is to be/has been scheduled
 java.lang.Object getRunClass()
           
 boolean isSimpleJob()
           
 void setDate(java.util.Date d)
          Set this request to execute at the specified date/time (once)
 void setDaysOfMonth(java.lang.String s)
           
 void setDaysOfWeek(java.lang.String s)
           
 void setHours(java.lang.String s)
           
 void setMinutes(java.lang.String s)
          Specify a minute or set of minutes, where each minute (0 thru 59, inclusive) indicates a minute of the hour at which this request will be run.
 void setMonths(java.lang.String s)
           
 void setNumber(int newNumber)
          The scheduler (only) sets the identifying number of this request
 void setPriority(int newPrio)
          Set the priority of this task.
 void setRepeatInterval(int secs)
           
 void setRepeatParam(int repeatparam)
           
 void setRequest(ModelRequest req)
          Specify a ModelRequest to be executed at the specified date/time(s)
 void setRunClass(java.lang.Object runclass)
           
 void setSeconds(java.lang.String s)
           
 void setSimpleJob(boolean simplejob)
           
 void setTrigger(Trigger trigger)
          Set the Quartz trigger associated with this instance of the scheduled- request.
 void setYears(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

idNumber

private int idNumber

minutes

private java.lang.String minutes

hours

private java.lang.String hours

daysOfMonth

private java.lang.String daysOfMonth

months

private java.lang.String months

daysOfWeek

private java.lang.String daysOfWeek

years

private java.lang.String years

seconds

private java.lang.String seconds

myPrio

int myPrio

runclass

private java.lang.Object runclass

simplejob

private boolean simplejob

repeatparam

private int repeatparam

repeatInterval

private int repeatInterval

myRequest

private ModelRequest myRequest
The ModelRequest associated with this request


myTrigger

private Trigger myTrigger
The Quartz trigger associated with this request

Constructor Detail

QuartzScheduledRequestImpl

public QuartzScheduledRequestImpl()
Method Detail

getNumber

public int getNumber()
Description copied from interface: ScheduledRequest
Get the sequential request number provided by the scheduler when this task was scheduled

Specified by:
getNumber in interface ScheduledRequest
See Also:
ScheduledRequest.getNumber()

setMinutes

public void setMinutes(java.lang.String s)
Description copied from interface: ScheduledRequest
Specify a minute or set of minutes, where each minute (0 thru 59, inclusive) indicates a minute of the hour at which this request will be run. Multiple minutes are seperated by commas (e.g. "5,10" and ranges may be specified, e.g. "10-20" would mean every minutes of the hour between 10 and 20, inclusive. A value of "*" means every minute of the hour.

Specified by:
setMinutes in interface ScheduledRequest
See Also:
ScheduledRequest.setMinutes(String)

setHours

public void setHours(java.lang.String s)
Specified by:
setHours in interface ScheduledRequest
See Also:
ScheduledRequest.setHours(String)

setDaysOfMonth

public void setDaysOfMonth(java.lang.String s)
Specified by:
setDaysOfMonth in interface ScheduledRequest
See Also:
ScheduledRequest.setDaysOfMonth(String)

setMonths

public void setMonths(java.lang.String s)
Specified by:
setMonths in interface ScheduledRequest
See Also:
ScheduledRequest.setMonths(String)

setYears

public void setYears(java.lang.String s)
Specified by:
setYears in interface ScheduledRequest
See Also:
ScheduledRequest.setYears(String)

setSeconds

public void setSeconds(java.lang.String s)
Specified by:
setSeconds in interface ScheduledRequest
See Also:
ScheduledRequest.setSeconds(String)

setDaysOfWeek

public void setDaysOfWeek(java.lang.String s)
Specified by:
setDaysOfWeek in interface ScheduledRequest
See Also:
ScheduledRequest.setDaysOfWeek(String)

setDate

public void setDate(java.util.Date d)
Description copied from interface: ScheduledRequest
Set this request to execute at the specified date/time (once)

Specified by:
setDate in interface ScheduledRequest
See Also:
ScheduledRequest.setDate(Date)

setRequest

public void setRequest(ModelRequest req)
Description copied from interface: ScheduledRequest
Specify a ModelRequest to be executed at the specified date/time(s)

Specified by:
setRequest in interface ScheduledRequest
See Also:
ScheduledRequest.setRequest(ModelRequest)

getRequest

public ModelRequest getRequest()
Description copied from interface: ScheduledRequest
Get the ModelRequest that is to be/has been scheduled

Specified by:
getRequest in interface ScheduledRequest
See Also:
ScheduledRequest.getRequest()

setNumber

public void setNumber(int newNumber)
Description copied from interface: ScheduledRequest
The scheduler (only) sets the identifying number of this request

Specified by:
setNumber in interface ScheduledRequest
See Also:
ScheduledRequest.setNumber(int)

setPriority

public void setPriority(int newPrio)
Description copied from interface: ScheduledRequest
Set the priority of this task. Tasks with higher priority will run before tasks with lower priority if multiple tasks are ready at once to run

Specified by:
setPriority in interface ScheduledRequest
See Also:
ScheduledRequest.setPriority(int)

getNextDate

public java.util.Date getNextDate()
Description copied from interface: ScheduledRequest
Return a Date when this object is next scheduled to be run (if at all). Null indicates that there is no schedule, and a date in the past indicates that the most current scheduled run is in the pas

Specified by:
getNextDate in interface ScheduledRequest
See Also:
ScheduledRequest.getNextDate()

getExpression

public java.lang.String getExpression()
Description copied from interface: ScheduledRequest
Return the formatted CRON-tab expression that is the cumulative of the previously set seconds, minutes, hours, day-of-month/week, year fields

Specified by:
getExpression in interface ScheduledRequest
See Also:
ScheduledRequest.getExpression()

setTrigger

public void setTrigger(Trigger trigger)
Set the Quartz trigger associated with this instance of the scheduled- request. Useful for figuring out the next time this request will fire.

Specified by:
setTrigger in interface QuartzScheduledRequest
Parameters:
trigger -

setRunClass

public void setRunClass(java.lang.Object runclass)
Specified by:
setRunClass in interface QuartzScheduledRequest
Parameters:
runclass -

getRunClass

public java.lang.Object getRunClass()
Specified by:
getRunClass in interface QuartzScheduledRequest
Returns:

setSimpleJob

public void setSimpleJob(boolean simplejob)
Specified by:
setSimpleJob in interface QuartzScheduledRequest
Parameters:
simplejob -

isSimpleJob

public boolean isSimpleJob()
Specified by:
isSimpleJob in interface QuartzScheduledRequest
Returns:

setRepeatParam

public void setRepeatParam(int repeatparam)
Specified by:
setRepeatParam in interface QuartzScheduledRequest
Parameters:
repeatparam -

getRepeatParam

public int getRepeatParam()
Specified by:
getRepeatParam in interface QuartzScheduledRequest
Returns:

setRepeatInterval

public void setRepeatInterval(int secs)
Specified by:
setRepeatInterval in interface QuartzScheduledRequest
Parameters:
secs -

getRepeatInterval

public int getRepeatInterval()
Specified by:
getRepeatInterval in interface QuartzScheduledRequest
Returns:

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.