org.apache.openejb.core.timer
Class EjbTimerServiceImpl
java.lang.Object
org.apache.openejb.core.timer.EjbTimerServiceImpl
- All Implemented Interfaces:
- EjbTimerService
public class EjbTimerServiceImpl
- extends java.lang.Object
- implements EjbTimerService
Method Summary |
void |
addTimerData(TimerData timerData)
Returns a timerData to the TimerStore, if a cancel() is rolled back. |
void |
cancelled(TimerData timerData)
Call back from TimerData and ejbTimeout when a timer has been cancelled (or is complete) and should be removed from stores. |
javax.ejb.Timer |
createTimer(java.lang.Object primaryKey,
java.util.Date initialExpiration,
long intervalDuration,
java.io.Serializable info)
|
javax.ejb.Timer |
createTimer(java.lang.Object primaryKey,
java.util.Date expiration,
java.io.Serializable info)
|
javax.ejb.Timer |
createTimer(java.lang.Object primaryKey,
long initialDuration,
long intervalDuration,
java.io.Serializable info)
|
javax.ejb.Timer |
createTimer(java.lang.Object primaryKey,
long duration,
java.io.Serializable info)
|
static java.util.concurrent.Executor |
getDefaultExecutor()
|
static javax.transaction.TransactionManager |
getDefaultTransactionManager()
|
javax.ejb.Timer |
getTimer(long timerId)
|
java.util.Collection<javax.ejb.Timer> |
getTimers(java.lang.Object primaryKey)
|
javax.transaction.TransactionManager |
getTransactionManager()
|
void |
schedule(TimerData timerData)
Called from TimerData and start when a timer should be scheduled with the java.util.Timer. |
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EjbTimerServiceImpl
public EjbTimerServiceImpl(DeploymentInfo deployment)
EjbTimerServiceImpl
public EjbTimerServiceImpl(DeploymentInfo deployment,
javax.transaction.TransactionManager transactionManager,
java.util.concurrent.Executor threadPool,
TimerStore timerStore,
int retryAttempts)
getDefaultExecutor
public static java.util.concurrent.Executor getDefaultExecutor()
getDefaultTransactionManager
public static javax.transaction.TransactionManager getDefaultTransactionManager()
start
public void start()
throws TimerStoreException
- Specified by:
start
in interface EjbTimerService
- Throws:
TimerStoreException
stop
public void stop()
- Specified by:
stop
in interface EjbTimerService
getTransactionManager
public javax.transaction.TransactionManager getTransactionManager()
schedule
public void schedule(TimerData timerData)
- Called from TimerData and start when a timer should be scheduled with the java.util.Timer.
- Parameters:
timerData
- the timer to schedule
cancelled
public void cancelled(TimerData timerData)
- Call back from TimerData and ejbTimeout when a timer has been cancelled (or is complete) and should be removed from stores.
- Parameters:
timerData
- the timer that was cancelled
addTimerData
public void addTimerData(TimerData timerData)
- Returns a timerData to the TimerStore, if a cancel() is rolled back.
- Parameters:
timerData
- the timer to be returned to the timer store
getTimer
public javax.ejb.Timer getTimer(long timerId)
- Specified by:
getTimer
in interface EjbTimerService
getTimers
public java.util.Collection<javax.ejb.Timer> getTimers(java.lang.Object primaryKey)
throws java.lang.IllegalStateException
- Specified by:
getTimers
in interface EjbTimerService
- Throws:
java.lang.IllegalStateException
createTimer
public javax.ejb.Timer createTimer(java.lang.Object primaryKey,
long duration,
java.io.Serializable info)
throws java.lang.IllegalArgumentException,
java.lang.IllegalStateException,
javax.ejb.EJBException
- Specified by:
createTimer
in interface EjbTimerService
- Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException
javax.ejb.EJBException
createTimer
public javax.ejb.Timer createTimer(java.lang.Object primaryKey,
long initialDuration,
long intervalDuration,
java.io.Serializable info)
throws java.lang.IllegalArgumentException,
java.lang.IllegalStateException,
javax.ejb.EJBException
- Specified by:
createTimer
in interface EjbTimerService
- Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException
javax.ejb.EJBException
createTimer
public javax.ejb.Timer createTimer(java.lang.Object primaryKey,
java.util.Date expiration,
java.io.Serializable info)
throws java.lang.IllegalArgumentException,
java.lang.IllegalStateException,
javax.ejb.EJBException
- Specified by:
createTimer
in interface EjbTimerService
- Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException
javax.ejb.EJBException
createTimer
public javax.ejb.Timer createTimer(java.lang.Object primaryKey,
java.util.Date initialExpiration,
long intervalDuration,
java.io.Serializable info)
throws java.lang.IllegalArgumentException,
java.lang.IllegalStateException,
javax.ejb.EJBException
- Specified by:
createTimer
in interface EjbTimerService
- Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException
javax.ejb.EJBException
Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.