| 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 beforethe timer expires. Parameters: info - Application information to be delivered alongwith the timer expiration 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 before the 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 alongwith the timer expiration 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 Collection | getTimers() Get all the active timers associated with this bean. |
createTimer | public Timer createTimer(long initialDuration, long intervalDuration, Serializable info) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, javax.ejb.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 first timer expiration notification. Parameters: intervalDuration - The number of milliseconds that must elapsebetween timer expiration notifications. Expiration notifications arescheduled relative to the time of the first expiration. If expirationis delayed(e.g. due to the interleaving of other method calls on thebean) two or more expiration notifications may occur in close succession to "catch up". Parameters: info - Application information to be delivered alongwith the timer expiration. This can be null. The newly created Timer. exception: java.lang.IllegalArgumentException - If initialDuration isnegative, or intervalDuration is negative. exception: java.lang.IllegalStateException - If this method isinvoked while the instance is in a state that does not allow access to this method. exception: javax.ejb.EJBException - If this method could not completedue to a system-level failure. |
createTimer | public Timer createTimer(Date initialExpiration, long intervalDuration, Serializable info) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, javax.ejb.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 notifications arescheduled relative to the time of the first expiration. If expirationis delayed(e.g. due to the interleaving of other method calls on thebean) two or more expiration notifications may occur in close succession to "catch up". Parameters: info - Application information to be delivered alongwith the timer expiration. This can be null. The newly created Timer. exception: java.lang.IllegalArgumentException - If initialExpiration isnull, or initialExpiration.getTime() is negative, or intervalDuration is negative. exception: java.lang.IllegalStateException - If this method isinvoked while the instance is in a state that does not allow access to this method. exception: javax.ejb.EJBException - If this method could not completedue to a system-level failure. |
|
|