|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.config.timer.EjbTimer
public class EjbTimer
Resin EJB timer. This object is mostly an adapter/decorator over the underlying scheduled task.
| Constructor Summary | |
|---|---|
EjbTimer()
Creates timer. |
|
EjbTimer(TimerTask task)
Creates timer. |
|
| Method Summary | |
|---|---|
void |
cancel()
Cause the timer and all its associated expiration notifications to be Canceled. |
TimerHandle |
getHandle()
Get a serializable handle to the timer. |
java.io.Serializable |
getInfo()
Get the information associated with the timer at the time of creation. |
java.util.Date |
getNextTimeout()
Get the point in time at which the next timer expiration is scheduled to occur. |
ScheduleExpression |
getSchedule()
Get the schedule expression corresponding to this timer. |
long |
getTimeRemaining()
Get the number of milliseconds that will elapse before the next scheduled timer expiration. |
boolean |
isCalendarTimer()
Query whether this timer is a calendar-based timer. |
boolean |
isPersistent()
Query whether this timer has persistent semantics. |
void |
run()
Runs the timer task. |
void |
setScheduledTask(TimerTask scheduledTask)
Sets the underlying scheduled task. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EjbTimer()
public EjbTimer(TimerTask task)
| Method Detail |
|---|
public void setScheduledTask(TimerTask scheduledTask)
scheduledTask - The underlying scheduled task.
public ScheduleExpression getSchedule()
throws java.lang.IllegalStateException,
NoSuchObjectLocalException,
EJBException
getSchedule in interface Timerjava.lang.IllegalStateException - If this method is invoked while the instance is in a state that
does not allow access to this method. Also thrown if invoked on a
timer that was created with one of the non-ScheduleExpression
TimerService.createTimer APIs.
NoSuchObjectLocalException - If invoked on a timer that has expired or has been canceled.
EJBException - If this method could not complete due to a system-level failure.
public java.io.Serializable getInfo()
throws java.lang.IllegalStateException,
NoSuchObjectLocalException,
EJBException
getInfo in interface Timerjava.lang.IllegalStateException - If this method is invoked while the instance is in a state that
does not allow access to this method.
NoSuchObjectLocalException - If invoked on a timer that has expired or has been canceled.
EJBException - If this method could not complete due to a system-level failure.
public boolean isPersistent()
throws java.lang.IllegalStateException,
NoSuchObjectLocalException,
EJBException
isPersistent in interface Timerjava.lang.IllegalStateException - If this method is invoked while the instance is in a state that
does not allow access to this method.
NoSuchObjectLocalException - If invoked on a timer that has expired or has been canceled.
EJBException - If this method could not complete due to a system-level failure.
public boolean isCalendarTimer()
throws java.lang.IllegalStateException,
NoSuchObjectLocalException,
EJBException
isCalendarTimer in interface Timerjava.lang.IllegalStateException - If this method is invoked while the instance is in a state that
does not allow access to this method.
NoSuchObjectLocalException - If invoked on a timer that has expired or has been cancelled.
EJBException - If this method could not complete due to a system-level failure.
public java.util.Date getNextTimeout()
throws java.lang.IllegalStateException,
NoSuchObjectLocalException,
EJBException
getNextTimeout in interface Timerjava.lang.IllegalStateException - If this method is invoked while the instance is in a state that
does not allow access to this method.
NoSuchObjectLocalException - If invoked on a timer that has expired or has been canceled.
EJBException - If this method could not complete due to a system-level failure.
public long getTimeRemaining()
throws java.lang.IllegalStateException,
NoSuchObjectLocalException,
EJBException
getTimeRemaining in interface Timerjava.lang.IllegalStateException - If this method is invoked while the instance is in a state that
does not allow access to this method.
NoSuchObjectLocalException - If invoked on a timer that has expired or has been canceled.
EJBException - If this method could not complete due to a system-level failure.
public TimerHandle getHandle()
throws java.lang.IllegalStateException,
NoSuchObjectLocalException,
EJBException
getHandle in interface Timerjava.lang.IllegalStateException - If this method is invoked while the instance is in a state that
does not allow access to this method.
NoSuchObjectLocalException - If invoked on a timer that has expired or has been canceled.
EJBException - If this method could not complete due to a system-level failure.
public void cancel()
throws java.lang.IllegalStateException,
NoSuchObjectLocalException,
EJBException
cancel in interface Timerjava.lang.IllegalStateException - If this method is invoked while the instance is in a state that
does not allow access to this method.
NoSuchObjectLocalException - If invoked on a timer that has expired or has been canceled.
EJBException - If this method could not complete due to a system-level failure.public void run()
run in interface java.lang.Runnablepublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||