|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.ejb.txtimer.TimerServiceImpl
The TimerService provides enterprise bean components with access to the container-provided Timer Service. The EJB Timer Service allows entity beans, stateless session beans, and message-driven beans to be registered for timer callback events at a specified time, after a specified elapsed time, or after a specified interval.
Constructor Summary | |
TimerServiceImpl(TimedObjectId timedObjectId,
TimedObjectInvoker timedObjectInvoker)
Create a Timer service for the given TimedObject |
Method Summary | |
javax.ejb.Timer |
createTimer(Date initialExpiration,
long intervalDuration,
Serializable info)
Create an interval txtimer whose first expiration occurs at a given point in time and whose subsequent expirations occur after a specified interval. |
javax.ejb.Timer |
createTimer(Date expiration,
Serializable info)
Create a single-action txtimer that expires at a given point in time. |
javax.ejb.Timer |
createTimer(long initialDuration,
long intervalDuration,
Serializable info)
Create an interval txtimer whose first expiration occurs after a specified duration, and whose subsequent expirations occur after a specified interval. |
javax.ejb.Timer |
createTimer(long duration,
Serializable info)
Create a single-action txtimer that expires after a specified duration. |
Collection |
getAllTimers()
Get the list of all registerd timers, both active and inactive |
TimedObjectInvoker |
getTimedObjectInvoker()
Get the TimedObjectInvoker associated with this TimerService |
javax.ejb.Timer |
getTimer(javax.ejb.TimerHandle handle)
Get the Timer for the given timedObjectId |
Collection |
getTimers()
Get all the active timers associated with this bean. |
Transaction |
getTransaction()
Get the current transaction |
void |
killAllTimers()
Kill all timers |
void |
killTimer(javax.ejb.TimerHandle handle)
Kill the timer for the given handle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TimerServiceImpl(TimedObjectId timedObjectId, TimedObjectInvoker timedObjectInvoker)
Method Detail |
public javax.ejb.Timer createTimer(long duration, Serializable info) throws IllegalArgumentException, IllegalStateException, javax.ejb.EJBException
createTimer
in interface javax.ejb.TimerService
duration
- The number of milliseconds that must elapse before the txtimer expires.info
- Application information to be delivered along with the txtimer expiration
notification. This can be null.
IllegalArgumentException
- If duration is negative
IllegalStateException
- If this method is invoked while the instance is in
a state that does not allow access to this method.
javax.ejb.EJBException
- If this method could not complete due to a system-level failure.public javax.ejb.Timer createTimer(long initialDuration, long intervalDuration, Serializable info) throws IllegalArgumentException, IllegalStateException, javax.ejb.EJBException
createTimer
in interface javax.ejb.TimerService
initialDuration
- The number of milliseconds that must elapse before the first
txtimer expiration notification.intervalDuration
- The number of milliseconds that must elapse between txtimer
expiration notifications. Expiration notifications are
scheduled relative to the time of the first expiration. If
expiration is delayed(e.g. due to the interleaving of other
method calls on the bean) two or more expiration notifications
may occur in close succession to "catch up".info
- Application information to be delivered along with the txtimer expiration
notification. This can be null.
IllegalArgumentException
- If initialDuration is negative, or intervalDuration
is negative.
IllegalStateException
- If this method is invoked while the instance is in
a state that does not allow access to this method.
javax.ejb.EJBException
- If this method could not complete due to a system-level failure.public javax.ejb.Timer createTimer(Date expiration, Serializable info) throws IllegalArgumentException, IllegalStateException, javax.ejb.EJBException
createTimer
in interface javax.ejb.TimerService
expiration
- The point in time at which the txtimer must expire.info
- Application information to be delivered along with the txtimer expiration
notification. This can be null.
IllegalArgumentException
- If expiration is null, or expiration.getTime() is negative.
IllegalStateException
- If this method is invoked while the instance is in
a state that does not allow access to this method.
javax.ejb.EJBException
- If this method could not complete due to a system-level failure.public javax.ejb.Timer createTimer(Date initialExpiration, long intervalDuration, Serializable info) throws IllegalArgumentException, IllegalStateException, javax.ejb.EJBException
createTimer
in interface javax.ejb.TimerService
initialExpiration
- The point in time at which the first txtimer expiration must occur.intervalDuration
- The number of milliseconds that must elapse between txtimer
expiration notifications. Expiration notifications are
scheduled relative to the time of the first expiration. If
expiration is delayed(e.g. due to the interleaving of other
method calls on the bean) two or more expiration notifications
may occur in close succession to "catch up".info
- Application information to be delivered along with the txtimer expiration
notification. This can be null.
IllegalArgumentException
- If initialExpiration is null, or initialExpiration.getTime()
is negative, or intervalDuration is negative.
IllegalStateException
- If this method is invoked while the instance is in
a state that does not allow access to this method.
javax.ejb.EJBException
- If this method could not complete due to a system-level failure.public Collection getTimers() throws IllegalStateException, javax.ejb.EJBException
getTimers
in interface javax.ejb.TimerService
IllegalStateException
- If this method is invoked while the instance is in
a state that does not allow access to this method.
javax.ejb.EJBException
- If this method could not complete due to a system-level failure.public Collection getAllTimers()
public javax.ejb.Timer getTimer(javax.ejb.TimerHandle handle)
public void killTimer(javax.ejb.TimerHandle handle)
public void killAllTimers()
public TimedObjectInvoker getTimedObjectInvoker()
public Transaction getTransaction()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |