EJB 3.1 API 1.0.1.Final

javax.ejb
Class ScheduleExpression

java.lang.Object
  extended by javax.ejb.ScheduleExpression
All Implemented Interfaces:
Serializable

public class ScheduleExpression
extends Object
implements Serializable

A calendar-based timeout expression for an enterprise bean timer. See EJB specification for the full timer expression syntax.

Each expression attribute has two overloaded setter methods, one that takes a String and one that takes an int. The int version is merely a convenience method for setting the attribute in the common case that the value is a simple integer.

E.g.
scheduleExpression.second(10) is semantically equivalent to scheduleExpression.second("10") None of the ScheduleExpression methods are required to be called. The defaults are :

{ second , minute , hour } : "0"

{ dayOfMonth, month, dayOfWeek, year } : "*"

timezone : default JVM time zone

startDate : no start date

endDate : no end date

Since:
3.1
Version:
$Revision: 107909 $
Author:
Carlo de Wolf
See Also:
Serialized Form

Constructor Summary
ScheduleExpression()
           
 
Method Summary
 ScheduleExpression dayOfMonth(int d)
           
 ScheduleExpression dayOfMonth(String d)
           
 ScheduleExpression dayOfWeek(int d)
           
 ScheduleExpression dayOfWeek(String d)
           
 ScheduleExpression end(Date e)
           
 String getDayOfMonth()
           
 String getDayOfWeek()
           
 Date getEnd()
           
 String getHour()
           
 String getMinute()
           
 String getMonth()
           
 String getSecond()
           
 Date getStart()
           
 String getTimezone()
           
 String getYear()
           
 ScheduleExpression hour(int h)
           
 ScheduleExpression hour(String h)
           
 ScheduleExpression minute(int m)
           
 ScheduleExpression minute(String m)
           
 ScheduleExpression month(int m)
           
 ScheduleExpression month(String m)
           
 ScheduleExpression second(int s)
           
 ScheduleExpression second(String s)
           
 ScheduleExpression start(Date s)
           
 ScheduleExpression timezone(String s)
           
 String toString()
           
 ScheduleExpression year(int y)
           
 ScheduleExpression year(String y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScheduleExpression

public ScheduleExpression()
Method Detail

dayOfMonth

public ScheduleExpression dayOfMonth(int d)

dayOfMonth

public ScheduleExpression dayOfMonth(String d)

dayOfWeek

public ScheduleExpression dayOfWeek(int d)

dayOfWeek

public ScheduleExpression dayOfWeek(String d)

end

public ScheduleExpression end(Date e)

getDayOfMonth

public String getDayOfMonth()

getDayOfWeek

public String getDayOfWeek()

getEnd

public Date getEnd()

getHour

public String getHour()

getMinute

public String getMinute()

getMonth

public String getMonth()

getSecond

public String getSecond()

getStart

public Date getStart()

getTimezone

public String getTimezone()

getYear

public String getYear()

hour

public ScheduleExpression hour(int h)

hour

public ScheduleExpression hour(String h)

minute

public ScheduleExpression minute(int m)

minute

public ScheduleExpression minute(String m)

month

public ScheduleExpression month(int m)

month

public ScheduleExpression month(String m)

second

public ScheduleExpression second(int s)

second

public ScheduleExpression second(String s)

start

public ScheduleExpression start(Date s)

timezone

public ScheduleExpression timezone(String s)

year

public ScheduleExpression year(int y)

year

public ScheduleExpression year(String y)

toString

public String toString()
Overrides:
toString in class Object

EJB 3.1 API 1.0.1.Final

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.