com.sun.ejb.containers
Class TimerSchedule

java.lang.Object
  extended by com.sun.ejb.containers.TimerSchedule
All Implemented Interfaces:
Serializable

public class TimerSchedule
extends Object
implements Serializable

A runtime representation of the user-defined calendar-based timeout expression for an enterprise bean timer.

See Also:
Serialized Form

Constructor Summary
TimerSchedule()
          Construct TimerSchedule instance with all defaults.
TimerSchedule(ScheduledTimerDescriptor sd, String methodName, int paramCount)
          Construct TimerSchedule instance from a given Schedule annotation.
TimerSchedule(ScheduleExpression se)
          Construct TimerSchedule instance from a given ScheduleExpression.
TimerSchedule(String s)
          Reconstruct TimerSchedule instance from a given String.
 
Method Summary
 TimerSchedule dayOfMonth(String d)
           
 TimerSchedule dayOfWeek(String d)
           
 TimerSchedule end(Date e)
           
 boolean equals(Object o)
           
 String getDayOfMonth()
           
 String getDayOfWeek()
           
 Date getEnd()
           
 String getHour()
           
 int getMethodParamCount()
           
 String getMinute()
           
 String getMonth()
           
 Calendar getNextTimeout()
          Returns the Date of the next possible timeout.
 Calendar getNextTimeout(Date date)
          Returns the Date of the next possible timeout after the specific date.
 String getScheduleAsString()
           
 ScheduleExpression getScheduleExpression()
           
 String getSecond()
           
 Date getStart()
           
 String getTimerMethodName()
           
 TimeZone getTimeZone()
           
 String getTimeZoneID()
           
 String getYear()
           
 int hashCode()
           
 TimerSchedule hour(String h)
           
 boolean isAutomatic()
           
 boolean isValid(Calendar date)
          Returns true if this date can be used for the next timeout of the schedule represented by this instance.
static boolean isValid(ScheduledTimerDescriptor s)
          Returns true if this Schedule can calculate its next timeout without errors.
 TimerSchedule minute(String m)
           
 TimerSchedule month(String m)
           
 TimerSchedule second(String s)
           
 TimerSchedule setAutomatic(boolean b)
           
 TimerSchedule start(Date s)
           
 TimerSchedule timezone(String tz)
           
 TimerSchedule year(String y)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimerSchedule

public TimerSchedule()
Construct TimerSchedule instance with all defaults.


TimerSchedule

public TimerSchedule(ScheduleExpression se)
Construct TimerSchedule instance from a given ScheduleExpression. Need to copy all values because ScheduleExpression is mutable and can be modified by the user.


TimerSchedule

public TimerSchedule(ScheduledTimerDescriptor sd,
                     String methodName,
                     int paramCount)
Construct TimerSchedule instance from a given Schedule annotation.


TimerSchedule

public TimerSchedule(String s)
Reconstruct TimerSchedule instance from a given String.

Method Detail

second

public TimerSchedule second(String s)

getSecond

public String getSecond()

minute

public TimerSchedule minute(String m)

getMinute

public String getMinute()

hour

public TimerSchedule hour(String h)

getHour

public String getHour()

dayOfMonth

public TimerSchedule dayOfMonth(String d)

getDayOfMonth

public String getDayOfMonth()

month

public TimerSchedule month(String m)

getMonth

public String getMonth()

dayOfWeek

public TimerSchedule dayOfWeek(String d)

getDayOfWeek

public String getDayOfWeek()

year

public TimerSchedule year(String y)

getYear

public String getYear()

timezone

public TimerSchedule timezone(String tz)

getTimeZoneID

public String getTimeZoneID()

getTimeZone

public TimeZone getTimeZone()

start

public TimerSchedule start(Date s)

getStart

public Date getStart()

end

public TimerSchedule end(Date e)

getEnd

public Date getEnd()

setAutomatic

public TimerSchedule setAutomatic(boolean b)

isAutomatic

public boolean isAutomatic()

getTimerMethodName

public String getTimerMethodName()

getMethodParamCount

public int getMethodParamCount()

getScheduleAsString

public String getScheduleAsString()

getScheduleExpression

public ScheduleExpression getScheduleExpression()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

isValid

public static boolean isValid(ScheduledTimerDescriptor s)
Returns true if this Schedule can calculate its next timeout without errors.


isValid

public boolean isValid(Calendar date)
Returns true if this date can be used for the next timeout of the schedule represented by this instance.


getNextTimeout

public Calendar getNextTimeout()
Returns the Date of the next possible timeout.


getNextTimeout

public Calendar getNextTimeout(Date date)
Returns the Date of the next possible timeout after the specific date.



Copyright © 2012 GlassFish Community. All Rights Reserved.