| javax.ejb.TimerService
All known Subclasses: com.bm.utils.substitues.MockedTimerService, com.bm.utils.substitues.FakedTimerService,
TimerService | public interface TimerService (Code) | | The TimerService interface 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.
See Also: EJB 3.0 specification author: Florent Benoit |
Method Summary | |
Timer | createTimer(long duration, Serializable info) Create a single-action timer that expires after a specified duration.
Parameters: duration - The number of milliseconds that must elapse before thetimer expires. Parameters: info - Application information to be delivered along with the timerexpiration notification. | Timer | createTimer(long initialDuration, long intervalDuration, Serializable info) Create an interval timer whose first expiration occurs after a specified
duration, and whose subsequent expirations occur after a specified
interval.
Parameters: initialDuration - The number of milliseconds that must elapse beforethe first timer expiration notification. Parameters: intervalDuration - The number of milliseconds that must elapsebetween timer expiration notifications. | Timer | createTimer(Date expiration, Serializable info) Create a single-action timer that expires at a given point in time.
Parameters: expiration - The point in time at which the timer must expire. Parameters: info - Application information to be delivered along with the timerexpiration notification. | Timer | createTimer(Date initialExpiration, long intervalDuration, Serializable info) Create an interval timer whose first expiration occurs at a given point
in time and whose subsequent expirations occur after a specified
interval.
Parameters: initialExpiration - The point in time at which the first timerexpiration must occur. Parameters: intervalDuration - The number of milliseconds that must elapsebetween timer expiration notifications. | Collection | getTimers() Get all the active timers associated with this bean. |
createTimer | Timer createTimer(long duration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException(Code) | | Create a single-action timer that expires after a specified duration.
Parameters: duration - The number of milliseconds that must elapse before thetimer expires. Parameters: info - Application information to be delivered along with the timerexpiration notification. This can be null. The newly created Timer. throws: IllegalArgumentException - If duration is negative throws: IllegalStateException - If this method is invoked while theinstance is in a state that does not allow access to this method. throws: EJBException - If this method fails due to a system-level failure. |
createTimer | Timer createTimer(long initialDuration, long intervalDuration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException(Code) | | Create an interval timer whose first expiration occurs after a specified
duration, and whose subsequent expirations occur after a specified
interval.
Parameters: initialDuration - The number of milliseconds that must elapse beforethe first timer expiration notification. Parameters: intervalDuration - The number of milliseconds that must elapsebetween timer expiration notifications. Expiration notificationsare scheduled relative to the time of the first expiration. Ifexpiration is delayed(e.g. due to the interleaving of other methodcalls on the bean) two or more expiration notifications may occurin close succession to "catch up". Parameters: info - Application information to be delivered along with the timerexpiration. This can be null. The newly created Timer. throws: IllegalArgumentException - If initialDuration is negative, orintervalDuration is negative. throws: IllegalStateException - If this method is invoked while theinstance is in a state that does not allow access to this method. throws: EJBException - If this method could not complete due to asystem-level failure. |
createTimer | Timer createTimer(Date expiration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException(Code) | | Create a single-action timer that expires at a given point in time.
Parameters: expiration - The point in time at which the timer must expire. Parameters: info - Application information to be delivered along with the timerexpiration notification. This can be null. The newly created Timer. throws: IllegalArgumentException - If expiration is null, orexpiration.getTime() is negative. throws: IllegalStateException - If this method is invoked while theinstance is in a state that does not allow access to this method. throws: EJBException - If this method could not complete due to asystem-level failure. |
createTimer | Timer createTimer(Date initialExpiration, long intervalDuration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException(Code) | | Create an interval timer whose first expiration occurs at a given point
in time and whose subsequent expirations occur after a specified
interval.
Parameters: initialExpiration - The point in time at which the first timerexpiration must occur. Parameters: intervalDuration - The number of milliseconds that must elapsebetween timer expiration notifications. Expiration notificationsare scheduled relative to the time of the first expiration. Ifexpiration is delayed(e.g. due to the interleaving of other methodcalls on the bean) two or more expiration notifications may occurin close succession to "catch up". Parameters: info - Application information to be delivered along with the timerexpiration. This can be null. The newly created Timer. throws: IllegalArgumentException - If initialExpiration is null, orinitialExpiration.getTime() is negative, or intervalDuration isnegative. throws: IllegalStateException - If this method is invoked while theinstance is in a state that does not allow access to this method. throws: EJBException - If this method could not complete due to asystem-level failure. |
|
|