|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonas_ejb.container.JTimer
JOnAS Implementation of the Timer interface (from EJB 2.1) This is a basic implementation based on jonas_timer. A later (and better ?) implementation could be based on Quartz.
Constructor Summary | |
JTimer(JTimerService timerservice,
long initial,
long period,
java.io.Serializable info)
constructor |
Method Summary | |
void |
afterCompletion(int status)
The afterCompletion method is called by the transaction manager after the transaction is committed or rolled back. |
void |
beforeCompletion()
|
void |
cancel()
Cause the timer and all its associated expiration notifications to be cancelled. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
javax.ejb.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. |
long |
getInitial()
|
java.util.Date |
getNextTimeout()
Get the point in time at which the next timer expiration is scheduled to occur. |
long |
getPeriod()
|
long |
getStartTime()
|
long |
getTimeRemaining()
Get the number of milliseconds that will elapse before the next scheduled timer expiration. |
JTimerService |
getTimerService()
|
int |
hashCode()
Returns a hash code value for the object. |
void |
startTimer()
start the Timer |
void |
stopTimer()
Stop a timer. |
void |
timeoutExpired(java.lang.Object arg)
The timer has just expired. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JTimer(JTimerService timerservice, long initial, long period, java.io.Serializable info)
Method Detail |
public long getStartTime()
public long getInitial()
public long getPeriod()
public JTimerService getTimerService()
public void startTimer()
public void stopTimer()
public boolean equals(java.lang.Object obj)
obj
- - the reference object with which to compare.
public int hashCode()
public void timeoutExpired(java.lang.Object arg)
timeoutExpired
in interface TimerEventListener
public void cancel() throws java.lang.IllegalStateException, javax.ejb.NoSuchObjectLocalException, javax.ejb.EJBException
cancel
in interface javax.ejb.Timer
java.lang.IllegalStateException
- the instance is in a state that does not
allow access to this method.
javax.ejb.NoSuchObjectLocalException
- If invoked on a timer that has expired
or has been cancelled.
javax.ejb.EJBException
- If this method could not complete due to a
system-level failure.public long getTimeRemaining() throws java.lang.IllegalStateException, javax.ejb.NoSuchObjectLocalException, javax.ejb.EJBException
getTimeRemaining
in interface javax.ejb.Timer
java.lang.IllegalStateException
- the instance is in a state that does not
allow access to this method.
javax.ejb.NoSuchObjectLocalException
- If invoked on a timer that has expired
or has been cancelled.
javax.ejb.EJBException
- If this method could not complete due to a
system-level failure.public java.util.Date getNextTimeout() throws java.lang.IllegalStateException, javax.ejb.NoSuchObjectLocalException, javax.ejb.EJBException
getNextTimeout
in interface javax.ejb.Timer
java.lang.IllegalStateException
- the instance is in a state that does not
allow access to this method.
javax.ejb.NoSuchObjectLocalException
- If invoked on a timer that has expired
or has been cancelled.
javax.ejb.EJBException
- If this method could not complete due to a
system-level failure.public java.io.Serializable getInfo() throws java.lang.IllegalStateException, javax.ejb.NoSuchObjectLocalException, javax.ejb.EJBException
getInfo
in interface javax.ejb.Timer
java.lang.IllegalStateException
- the instance is in a state that does not
allow access to this method.
javax.ejb.NoSuchObjectLocalException
- If invoked on a timer that has expired
or has been cancelled.
javax.ejb.EJBException
- If this method could not complete due to a
system-level failure.public javax.ejb.TimerHandle getHandle() throws java.lang.IllegalStateException, javax.ejb.NoSuchObjectLocalException, javax.ejb.EJBException
getHandle
in interface javax.ejb.Timer
java.lang.IllegalStateException
- the instance is in a state that does not
allow access to this method.
javax.ejb.NoSuchObjectLocalException
- If invoked on a timer that has expired
or has been cancelled.
javax.ejb.EJBException
- If this method could not complete due to a
system-level failure.public void afterCompletion(int status)
afterCompletion
in interface javax.transaction.Synchronization
status
- The status of the transaction completion.public void beforeCompletion()
beforeCompletion
in interface javax.transaction.Synchronization
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |