| java.lang.Object org.objectweb.jonas_ejb.container.JTimerService
JTimerService | public class JTimerService implements TimerService(Code) | | JOnAS Implementation of the TimerService interface (from EJB 2.1) One such
object is created the first time a bean calls getTimerService. Basically
manages the list of the Timers for that bean.
author: Philippe Durieux |
Method Summary | |
public void | cancelAllTimers() | 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. Parameters: info - Application information to be delivered along with the timerexpiration. | 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 expiration mustoccur. Parameters: info - Application information to be delivered along with the timerexpiration. | 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. Parameters: info - Application information to be delivered along with the timerexpiration. | 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. | public String | getContainer() | public String | getEjbName() | public Serializable | getPK() | public Timer | getTimerByTime(long initialDuration, long intervalDuration, Serializable info) | public Collection | getTimers() Get all the active timers associated with this bean. | public TransactionManager | getTransactionManager() | public void | notify(Timer timer) | public void | remove(Timer timer) |
JTimerService | public JTimerService(JFactory bf)(Code) | | constructor used for MDB or Session beans
|
cancelAllTimers | public void cancelAllTimers()(Code) | | cancel all timers (when entity bean is removed)
|
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. Parameters: info - Application information to be delivered along with the timerexpiration. This can be null. the newly created Timer. throws: IllegalArgumentException - initialExpiration = 0, orintervalDuration < 0 or initialExpiration.getTime() < 0. throws: IllegalStateException - the instance is in a state that does notallow 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 expiration mustoccur. Parameters: info - Application information to be delivered along with the timerexpiration. This can be null. the newly created Timer. throws: IllegalArgumentException - expiration = 0, or expiration.getTime() <0. throws: IllegalStateException - the instance is in a state that does notallow access to this method. throws: EJBException - If this method could not complete due to asystem-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. Parameters: info - Application information to be delivered along with the timerexpiration. This can be null. the newly created Timer. throws: IllegalArgumentException - initialExpiration = 0, orintervalDuration < 0. throws: IllegalStateException - the instance is in a state that does notallow access to this method. throws: EJBException - If this method could not complete due to asystem-level failure. |
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. This can be null. the newly created Timer. throws: IllegalArgumentException - initialExpiration = 0, orintervalDuration < 0. throws: IllegalStateException - the instance is in a state that does notallow access to this method. throws: EJBException - If this method could not complete due to asystem-level failure. |
getContainer | public String getContainer()(Code) | | the Container File Name |
getEjbName | public String getEjbName()(Code) | | the EjbName used to retrieve the bean factory |
getTimerByTime | public Timer getTimerByTime(long initialDuration, long intervalDuration, Serializable info)(Code) | | get a Timer from the list
|
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 - the instance is in a state that does notallow access to this method. throws: EJBException - If this method could not complete due to asystem-level failure. |
getTransactionManager | public TransactionManager getTransactionManager()(Code) | | the Transaction Manager |
notify | public void notify(Timer timer)(Code) | | Notify the timer to the listener
Parameters: timer - The Timer object that will be notified |
remove | public void remove(Timer timer)(Code) | | Remove the Timer
Parameters: timer - The Timer object that will be removed |
|
|