| java.lang.Object org.ow2.easybeans.component.quartz.QuartzTimerService
QuartzTimerService | public class QuartzTimerService implements TimerService(Code) | | Implementation of the EJB Timer service that is based on the Quartz
framework.
author: Florent Benoit |
Constructor Summary | |
public | QuartzTimerService(Factory factory, Scheduler scheduler) Build a new instance of the EJB Timer service for the given factory and
the given scheduler. |
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 thetimer expires. Parameters: info - Application information to be delivered along with the timerexpiration notification. | 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 beforethe first timer expiration notification. Parameters: intervalDuration - The number of milliseconds that must elapsebetween timer expiration 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 timerexpiration notification. | 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 timerexpiration must occur. Parameters: intervalDuration - The number of milliseconds that must elapsebetween timer expiration notifications. | public Scheduler | getScheduler() Gets the Scheduler. | public Collection | getTimers() Get all the active timers associated with this bean. |
QuartzTimerService | public QuartzTimerService(Factory factory, Scheduler scheduler)(Code) | | Build a new instance of the EJB Timer service for the given factory and
the given scheduler.
Parameters: factory - the given factory Parameters: scheduler - the given scheduler |
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 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 | 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 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 | 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 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 | 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 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. |
getScheduler | public Scheduler getScheduler()(Code) | | Gets the Scheduler.
the scheduler. |
getTimers | public Collection getTimers() throws IllegalStateException, EJBException(Code) | | Get all the active timers associated with this bean.
A collection of javax.ejb.Timer objects. 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. |
|
|