|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.jonas_ejb.container.JTimerService
public class JTimerService
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.
Constructor Summary | |
---|---|
JTimerService(JEntitySwitch es)
constructor used for Entity beans |
|
JTimerService(JFactory bf)
constructor used for MDB or Session beans |
Method Summary | |
---|---|
void |
cancelAllTimers()
cancel all timers (when entity bean is removed) |
javax.ejb.Timer |
createTimer(java.util.Date initialExpiration,
long intervalDuration,
java.io.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. |
javax.ejb.Timer |
createTimer(java.util.Date expiration,
java.io.Serializable info)
Create a single-action timer that expires at a given point in time. |
javax.ejb.Timer |
createTimer(long initialDuration,
long intervalDuration,
java.io.Serializable info)
Create an interval timer whose first expiration occurs after a specified duration, and whose subsequent expirations occur after a specified interval. |
javax.ejb.Timer |
createTimer(long duration,
java.io.Serializable info)
Create a single-action timer that expires after a specified duration. |
java.lang.String |
getContainer()
|
java.lang.String |
getEjbName()
|
java.io.Serializable |
getPK()
|
javax.ejb.Timer |
getTimerByTime(long initialDuration,
long intervalDuration,
java.io.Serializable info)
get a Timer from the list |
java.util.Collection |
getTimers()
Get all the active timers associated with this bean. |
javax.transaction.TransactionManager |
getTransactionManager()
|
void |
notify(javax.ejb.Timer timer)
Notify the timer to the listener |
void |
remove(javax.ejb.Timer timer)
Remove the Timer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JTimerService(JFactory bf)
public JTimerService(JEntitySwitch es)
Method Detail |
---|
public javax.transaction.TransactionManager getTransactionManager()
public void notify(javax.ejb.Timer timer)
timer
- The Timer object that will be notifiedpublic void remove(javax.ejb.Timer timer)
timer
- The Timer object that will be removedpublic void cancelAllTimers()
public javax.ejb.Timer getTimerByTime(long initialDuration, long intervalDuration, java.io.Serializable info)
public javax.ejb.Timer createTimer(java.util.Date initialExpiration, long intervalDuration, java.io.Serializable info) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, javax.ejb.EJBException
createTimer
in interface javax.ejb.TimerService
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.info
- Application information to be delivered along with the timer
expiration. This can be null.
java.lang.IllegalArgumentException
- initialExpiration = 0, or
intervalDuration < 0 or initialExpiration.getTime() < 0.
java.lang.IllegalStateException
- the instance is in a state that does not
allow access to this method.
javax.ejb.EJBException
- If this method could not complete due to a
system-level failure.public javax.ejb.Timer createTimer(java.util.Date expiration, java.io.Serializable info) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, javax.ejb.EJBException
createTimer
in interface javax.ejb.TimerService
expiration
- The point in time at which the timer expiration must
occur.info
- Application information to be delivered along with the timer
expiration. This can be null.
java.lang.IllegalArgumentException
- expiration = 0, or expiration.getTime() <
0.
java.lang.IllegalStateException
- the instance is in a state that does not
allow access to this method.
javax.ejb.EJBException
- If this method could not complete due to a
system-level failure.public javax.ejb.Timer createTimer(long initialDuration, long intervalDuration, java.io.Serializable info) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, javax.ejb.EJBException
createTimer
in interface javax.ejb.TimerService
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.info
- Application information to be delivered along with the timer
expiration. This can be null.
java.lang.IllegalArgumentException
- initialExpiration = 0, or
intervalDuration < 0.
java.lang.IllegalStateException
- the instance is in a state that does not
allow access to this method.
javax.ejb.EJBException
- If this method could not complete due to a
system-level failure.public javax.ejb.Timer createTimer(long duration, java.io.Serializable info) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, javax.ejb.EJBException
createTimer
in interface javax.ejb.TimerService
duration
- The number of milliseconds that must elapse before the
timer expires.info
- Application information to be delivered along with the timer
expiration. This can be null.
java.lang.IllegalArgumentException
- initialExpiration = 0, or
intervalDuration < 0.
java.lang.IllegalStateException
- the instance is in a state that does not
allow access to this method.
javax.ejb.EJBException
- If this method could not complete due to a
system-level failure.public java.util.Collection getTimers() throws java.lang.IllegalStateException, javax.ejb.EJBException
getTimers
in interface javax.ejb.TimerService
java.lang.IllegalStateException
- the instance is in a state that does not
allow access to this method.
javax.ejb.EJBException
- If this method could not complete due to a
system-level failure.public java.lang.String getEjbName()
public java.io.Serializable getPK()
public java.lang.String getContainer()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |