| javax.ejb.TimerService
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.
|
Method Summary | |
public 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 the timer expires. Parameters: info - Application information to be delivered along with the timer expirationnotification. | public 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 before the firsttimer expiration notification. Parameters: intervalDuration - The number of milliseconds that must elapse between timerexpiration notifications. | public 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 timer expirationnotification. | public 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 timer expiration must occur. Parameters: intervalDuration - The number of milliseconds that must elapse between timerexpiration notifications. | public Collection | getTimers() Get all the active timers associated with this bean. |
createTimer | public 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 the timer expires. Parameters: info - Application information to be delivered along with the timer expirationnotification. This can be null. The newly created Timer. throws: IllegalArgumentException - If duration is negative throws: IllegalStateException - If this method is invoked while the instance is ina state that does not allow access to this method. throws: EJBException - If this method could not complete due to a system-level failure. |
createTimer | public 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 before the firsttimer expiration notification. Parameters: intervalDuration - The number of milliseconds that must elapse between timerexpiration notifications. Expiration notifications arescheduled relative to the time of the first expiration. Ifexpiration is delayed(e.g. due to the interleaving of othermethod calls on the bean) two or more expiration notificationsmay occur in close succession to "catch up". Parameters: info - Application information to be delivered along with the timer expirationnotification. This can be null. The newly created Timer. throws: IllegalArgumentException - If initialDuration is negative, or intervalDurationis negative. throws: IllegalStateException - If this method is invoked while the instance is ina state that does not allow access to this method. throws: EJBException - If this method could not complete due to a system-level failure. |
createTimer | public 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 timer expirationnotification. This can be null. The newly created Timer. throws: IllegalArgumentException - If expiration is null, or expiration.getTime() is negative. throws: IllegalStateException - If this method is invoked while the instance is ina state that does not allow access to this method. throws: EJBException - If this method could not complete due to a system-level failure. |
createTimer | public 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 timer expiration must occur. Parameters: intervalDuration - The number of milliseconds that must elapse between timerexpiration notifications. Expiration notifications arescheduled relative to the time of the first expiration. Ifexpiration is delayed(e.g. due to the interleaving of othermethod calls on the bean) two or more expiration notificationsmay occur in close succession to "catch up". Parameters: info - Application information to be delivered along with the timer expirationnotification. This can be null. The newly created Timer. throws: IllegalArgumentException - If initialExpiration is null, or initialExpiration.getTime()is negative, or intervalDuration is negative. throws: IllegalStateException - If this method is invoked while the instance is ina state that does not allow access to this method. throws: EJBException - If this method could not complete due to a system-level failure. |
|
|