com.scalagent.scheduler
Class CronEvent

java.lang.Object
  extended by com.scalagent.scheduler.ScheduleEvent
      extended by com.scalagent.scheduler.CronEvent
All Implemented Interfaces:
java.io.Serializable

public class CronEvent
extends ScheduleEvent

Event requesting a recurrent scheduling to a Scheduler. The recurring occurrence time is described in a cron like syntax, that is : = [ 0-59 | * ] = [ 0-23 | * ] = [ 1-31 | * ] = [ 0-11 | * ] = [ 0-6 | * ]

See Also:
Scheduler, ScheduleEvent, Serialized Form

Field Summary
private static int CRON_DOM
          days of month
private static int CRON_DOW
          days of week
private static int CRON_H
          hours of day
private static int CRON_MAX
          max value (+1) for CRON_* constants
private static int CRON_MN
          minutes of hour
private static int CRON_MOY
          months of year
private static int[] max
          maximum for values designed by CRON_* constants
private static int[] min
          minimum for values designed by CRON_* constants
private  java.util.BitSet[] ranges
          cron dates for this event
private static long serialVersionUID
          define serialVersionUID for interoperability
private static java.lang.String[] values
          string image for CRON_* constants, by index in the table
 
Fields inherited from class com.scalagent.scheduler.ScheduleEvent
date, name, outdatedRestart
 
Constructor Summary
CronEvent(java.lang.String name, java.lang.String date)
          Creates an item.
 
Method Summary
protected  java.util.Date nextDate(java.util.Date now)
          Returns the next scheduling date after current date given as parameter.
 java.lang.StringBuffer toString(java.lang.StringBuffer output)
          Provides a string image for this object.
 
Methods inherited from class com.scalagent.scheduler.ScheduleEvent
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
define serialVersionUID for interoperability

See Also:
Constant Field Values

CRON_MN

private static final int CRON_MN
minutes of hour

See Also:
Constant Field Values

CRON_H

private static final int CRON_H
hours of day

See Also:
Constant Field Values

CRON_DOM

private static final int CRON_DOM
days of month

See Also:
Constant Field Values

CRON_MOY

private static final int CRON_MOY
months of year

See Also:
Constant Field Values

CRON_DOW

private static final int CRON_DOW
days of week

See Also:
Constant Field Values

CRON_MAX

private static final int CRON_MAX
max value (+1) for CRON_* constants

See Also:
Constant Field Values

values

private static final java.lang.String[] values
string image for CRON_* constants, by index in the table


min

private static final int[] min
minimum for values designed by CRON_* constants


max

private static final int[] max
maximum for values designed by CRON_* constants


ranges

private java.util.BitSet[] ranges
cron dates for this event

Constructor Detail

CronEvent

public CronEvent(java.lang.String name,
                 java.lang.String date)
          throws java.lang.IllegalArgumentException
Creates an item.

Parameters:
name - event name
date - event scheduling date as a cron like string
Throws:
java.lang.IllegalArgumentException - when date is misformed
Method Detail

toString

public java.lang.StringBuffer toString(java.lang.StringBuffer output)
Provides a string image for this object.

Overrides:
toString in class ScheduleEvent
Returns:
a string image for this object

nextDate

protected java.util.Date nextDate(java.util.Date now)
Returns the next scheduling date after current date given as parameter. The new date must be strictly greater than the current date. A null date leads to the scheduler deleting the event.

Overrides:
nextDate in class ScheduleEvent
Parameters:
now - current date
Returns:
next scheduling date after now


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.