com.sun.ejb.containers
Class TimerSchedule

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

public class TimerSchedule
extends java.lang.Object
implements java.io.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, java.lang.String methodName, int paramCount)
          Construct TimerSchedule instance from a given Schedule annotation.
TimerSchedule(ScheduleExpression se)
          Construct TimerSchedule instance from a given ScheduleExpression.
TimerSchedule(java.lang.String s)
          Reconstruct TimerSchedule instance from a given String.
 
Method Summary
 TimerSchedule dayOfMonth(java.lang.String d)
           
 TimerSchedule dayOfWeek(java.lang.String d)
           
 TimerSchedule end(java.util.Date e)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getDayOfMonth()
           
 java.lang.String getDayOfWeek()
           
 java.util.Date getEnd()
           
 java.lang.String getHour()
           
 int getMethodParamCount()
           
 java.lang.String getMinute()
           
 java.lang.String getMonth()
           
 java.util.Calendar getNextTimeout()
          Returns the Date of the next possible timeout.
 java.util.Calendar getNextTimeout(java.util.Date date)
          Returns the Date of the next possible timeout after the specific date.
 java.lang.String getScheduleAsString()
           
 ScheduleExpression getScheduleExpression()
           
 java.lang.String getSecond()
           
 java.util.Date getStart()
           
 java.lang.String getTimerMethodName()
           
 java.util.TimeZone getTimeZone()
           
 java.lang.String getTimeZoneID()
           
 java.lang.String getYear()
           
 int hashCode()
           
 TimerSchedule hour(java.lang.String h)
           
 boolean isAutomatic()
           
 boolean isValid(java.util.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(java.lang.String m)
           
 TimerSchedule month(java.lang.String m)
           
 TimerSchedule second(java.lang.String s)
           
 TimerSchedule setAutomatic(boolean b)
           
 TimerSchedule start(java.util.Date s)
           
 TimerSchedule timezone(java.lang.String tz)
           
 TimerSchedule year(java.lang.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,
                     java.lang.String methodName,
                     int paramCount)
Construct TimerSchedule instance from a given Schedule annotation.


TimerSchedule

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

Method Detail

second

public TimerSchedule second(java.lang.String s)

getSecond

public java.lang.String getSecond()

minute

public TimerSchedule minute(java.lang.String m)

getMinute

public java.lang.String getMinute()

hour

public TimerSchedule hour(java.lang.String h)

getHour

public java.lang.String getHour()

dayOfMonth

public TimerSchedule dayOfMonth(java.lang.String d)

getDayOfMonth

public java.lang.String getDayOfMonth()

month

public TimerSchedule month(java.lang.String m)

getMonth

public java.lang.String getMonth()

dayOfWeek

public TimerSchedule dayOfWeek(java.lang.String d)

getDayOfWeek

public java.lang.String getDayOfWeek()

year

public TimerSchedule year(java.lang.String y)

getYear

public java.lang.String getYear()

timezone

public TimerSchedule timezone(java.lang.String tz)

getTimeZoneID

public java.lang.String getTimeZoneID()

getTimeZone

public java.util.TimeZone getTimeZone()

start

public TimerSchedule start(java.util.Date s)

getStart

public java.util.Date getStart()

end

public TimerSchedule end(java.util.Date e)

getEnd

public java.util.Date getEnd()

setAutomatic

public TimerSchedule setAutomatic(boolean b)

isAutomatic

public boolean isAutomatic()

getTimerMethodName

public java.lang.String getTimerMethodName()

getMethodParamCount

public int getMethodParamCount()

getScheduleAsString

public java.lang.String getScheduleAsString()

getScheduleExpression

public ScheduleExpression getScheduleExpression()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

isValid

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


isValid

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


getNextTimeout

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


getNextTimeout

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



Copyright © 2012 GlassFish Community. All Rights Reserved.