|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.ejb.txtimer.TimerImpl
An implementation of an EJB Timer.
Internally it uses a java.util.Timer and maintains its state in a Tx manner.
Method Summary | |
void |
afterCompletion(int status)
This method is invoked after the transaction has committed or rolled back. |
void |
beforeCompletion()
This method is invoked before the start of the commit or rollback process. |
void |
cancel()
Cause the txtimer and all its associated expiration notifications to be cancelled. |
boolean |
equals(Object obj)
Return true if objectId, createDate, periode are equal |
Date |
getFirstTime()
|
javax.ejb.TimerHandle |
getHandle()
Get a serializable handle to the txtimer. |
Serializable |
getInfo()
Get the information associated with the txtimer at the time of creation. |
Serializable |
getInfoInternal()
|
long |
getNextExpire()
|
Date |
getNextTimeout()
Get the point in time at which the next txtimer expiration is scheduled to occur. |
long |
getPeriode()
|
TimedObjectId |
getTimedObjectId()
|
long |
getTimeRemaining()
Get the number of milliseconds that will elapse before the next scheduled txtimer expiration. |
String |
getTimerId()
|
int |
hashCode()
Hash code based on the Timers invariant properties |
boolean |
isActive()
|
boolean |
isCanceled()
|
boolean |
isExpired()
|
void |
killTimer()
Kill the timer, and remove it from the timer service |
String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
public String getTimerId()
public TimedObjectId getTimedObjectId()
public Date getFirstTime()
public long getPeriode()
public long getNextExpire()
public Serializable getInfoInternal()
public boolean isActive()
public boolean isCanceled()
public boolean isExpired()
public void cancel() throws IllegalStateException, javax.ejb.NoSuchObjectLocalException, javax.ejb.EJBException
cancel
in interface javax.ejb.Timer
IllegalStateException
- If this method is invoked while the instance is in
a state that does not allow access to this method.
javax.ejb.NoSuchObjectLocalException
- If invoked on a txtimer that has expired or has been cancelled.
javax.ejb.EJBException
- If this method could not complete due to a system-level failure.public void killTimer()
public long getTimeRemaining() throws IllegalStateException, javax.ejb.NoSuchObjectLocalException, javax.ejb.EJBException
getTimeRemaining
in interface javax.ejb.Timer
IllegalStateException
- If this method is invoked while the instance is in
a state that does not allow access to this method.
javax.ejb.NoSuchObjectLocalException
- If invoked on a txtimer that has expired or has been cancelled.
javax.ejb.EJBException
- If this method could not complete due to a system-level failure.public Date getNextTimeout() throws IllegalStateException, javax.ejb.NoSuchObjectLocalException, javax.ejb.EJBException
getNextTimeout
in interface javax.ejb.Timer
IllegalStateException
- If this method is invoked while the instance is in
a state that does not allow access to this method.
javax.ejb.NoSuchObjectLocalException
- If invoked on a txtimer that has expired or has been cancelled.
javax.ejb.EJBException
- If this method could not complete due to a system-level failure.public Serializable getInfo() throws IllegalStateException, javax.ejb.NoSuchObjectLocalException, javax.ejb.EJBException
getInfo
in interface javax.ejb.Timer
IllegalStateException
- If this method is invoked while the instance is in
a state that does not allow access to this method.
javax.ejb.NoSuchObjectLocalException
- If invoked on a txtimer 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 IllegalStateException, javax.ejb.NoSuchObjectLocalException, javax.ejb.EJBException
getHandle
in interface javax.ejb.Timer
IllegalStateException
- If this method is invoked while the instance is in
a state that does not allow access to this method.
javax.ejb.NoSuchObjectLocalException
- If invoked on a txtimer that has expired or has been cancelled.
javax.ejb.EJBException
- If this method could not complete due to a system-level failure.public boolean equals(Object obj)
public int hashCode()
public String toString()
public void beforeCompletion()
beforeCompletion
in interface Synchronization
public void afterCompletion(int status)
afterCompletion
in interface Synchronization
status
- The status of the completed transaction.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |