public interface TimerService
The TimerService interface provides enterprise bean components with access to the container-provided Timer Service. The EJB Timer Service allows stateless session beans, singleton session beans, message-driven beans, and EJB 2.x entity beans to be registered for timer callback events at a specified time, after a specified elapsed time, after a specified interval, or according to a calendar-based schedule.
Timer
createCalendarTimer(ScheduleExpression schedule)
Timer
createCalendarTimer(ScheduleExpression schedule, TimerConfig timerConfig)
Timer
createIntervalTimer(java.util.Date initialExpiration, long intervalDuration, TimerConfig timerConfig)
Timer
createIntervalTimer(long initialDuration, long intervalDuration, TimerConfig timerConfig)
Timer
createSingleActionTimer(java.util.Date expiration, TimerConfig timerConfig)
Timer
createSingleActionTimer(long duration, TimerConfig timerConfig)
Timer
createTimer(java.util.Date initialExpiration, long intervalDuration, java.io.Serializable info)
Timer
createTimer(java.util.Date expiration, java.io.Serializable info)
Timer
createTimer(long initialDuration, long intervalDuration, java.io.Serializable info)
Timer
createTimer(long duration, java.io.Serializable info)
java.util.Collection<Timer>
getTimers()
Timer createTimer(long duration, java.io.Serializable info) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, EJBException
duration
- the number of milliseconds that must elapse before the timer expires.
info
- application information to be delivered along with the timer expiration notification. This can be null.
java.lang.IllegalArgumentException
- If duration is negative
java.lang.IllegalStateException
- If this method is invoked while the instance is in a state that does not allow access to this method.
EJBException
- If this method fails due to a system-level failure.
Timer createSingleActionTimer(long duration, TimerConfig timerConfig) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, EJBException
duration
- the number of milliseconds that must elapse before the timer expires.
timerConfig
- timer configuration.
java.lang.IllegalArgumentException
- If duration is negative
java.lang.IllegalStateException
- If this method is invoked while the instance is in a state that does not allow access to this method.
EJBException
- If this method fails due to a system-level failure.
Timer createTimer(long initialDuration, long intervalDuration, java.io.Serializable info) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, EJBException
initialDuration
- The number of milliseconds that must elapse before the first timer expiration notification.
intervalDuration
- The number of milliseconds that must elapse between timer 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 timer expiration. This can be null.
java.lang.IllegalArgumentException
- If initialDuration is negative or intervalDuration is negative.
java.lang.IllegalStateException
- If this method is invoked while the instance is in a state that does not allow access to this method.
EJBException
- If this method could not complete due to a system-level failure.
Timer createIntervalTimer(long initialDuration, long intervalDuration, TimerConfig timerConfig) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, EJBException
initialDuration
- The number of milliseconds that must elapse before the first timer expiration notification.
intervalDuration
- The number of milliseconds that must elapse between timer 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".
timerConfig
- timer configuration
java.lang.IllegalArgumentException
- If initialDuration is negative or intervalDuration is negative.
java.lang.IllegalStateException
- If this method is invoked while the instance is in a state that does not allow access to this method.
EJBException
- If this method could not complete due to a system-level failure.
Timer createTimer(java.util.Date expiration, java.io.Serializable info) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, EJBException
expiration
- The point in time at which the timer must expire.
info
- application information to be delivered along with the timer expiration notification. This can be null.
java.lang.IllegalArgumentException
- If expiration is null or expiration.getTime() is negative.
java.lang.IllegalStateException
- If this method is invoked while the instance is in a state that does not allow access to this method.
EJBException
- If this method could not complete due to a system-level failure.
Timer createSingleActionTimer(java.util.Date expiration, TimerConfig timerConfig) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, EJBException
expiration
- the point in time at which the timer must expire.
timerConfig
- timer configuration.
java.lang.IllegalArgumentException
- If expiration is null or expiration.getTime() is negative.
java.lang.IllegalStateException
- If this method is invoked while the instance is in a state that does not allow access to this method.
EJBException
- If this method could not complete due to a system-level failure.
Timer createTimer(java.util.Date initialExpiration, long intervalDuration, java.io.Serializable info) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, EJBException
initialExpiration
- the point in time at which the first timer expiration must occur.
intervalDuration
- the number of milliseconds that must elapse between timer 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 timer expiration. This can be null.
java.lang.IllegalArgumentException
- If initialExpiration is null, if initialExpiration.getTime() is negative, or if intervalDuration is negative.
java.lang.IllegalStateException
- If this method is invoked while the instance is in a state that does not allow access to this method.
EJBException
- If this method could not complete due to a system-level failure.
Timer createIntervalTimer(java.util.Date initialExpiration, long intervalDuration, TimerConfig timerConfig) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, EJBException
initialExpiration
- the point in time at which the first timer expiration must occur.
intervalDuration
- the number of milliseconds that must elapse between timer 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".
timerConfig
- timer configuration.
java.lang.IllegalArgumentException
- If initialExpiration is null, if initialExpiration.getTime() is negative, or if intervalDuration is negative.
java.lang.IllegalStateException
- If this method is invoked while the instance is in a state that does not allow access to this method.
EJBException
- If this method could not complete due to a system-level failure.
Timer createCalendarTimer(ScheduleExpression schedule) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, EJBException
schedule
- a schedule expression describing the timeouts for this timer.
java.lang.IllegalArgumentException
- If Schedule represents an invalid schedule expression.
java.lang.IllegalStateException
- If this method is invoked while the instance is in a state that does not allow access to this method.
EJBException
- If this method could not complete due to a system-level failure.
Timer createCalendarTimer(ScheduleExpression schedule, TimerConfig timerConfig) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, EJBException
schedule
- a schedule expression describing the timeouts for this timer.
timerConfig
- timer configuration.
java.lang.IllegalArgumentException
- If Schedule represents an invalid schedule expression.
java.lang.IllegalStateException
- If this method is invoked while the instance is in a state that does not allow access to this method.
EJBException
- If this method could not complete due to a system-level failure.
java.util.Collection<Timer> getTimers() throws java.lang.IllegalStateException, EJBException
javax.ejb.Timer
objects.
java.lang.IllegalStateException
- If this method is invoked while the instance is in a state that does not allow access to this method.
EJBException
- If this method could not complete due to a system-level failure.
Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 10-February-2011 12:41
Scripting on this page tracks web page traffic, but does not change the content in any way.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4