org.apache.openejb.core.timer
Class NullEjbTimerServiceImpl

java.lang.Object
  extended by org.apache.openejb.core.timer.NullEjbTimerServiceImpl
All Implemented Interfaces:
EjbTimerService

public class NullEjbTimerServiceImpl
extends Object
implements EjbTimerService

Idempotent EjbTimerServiceImplementation. Used if a Bean does not implement a timeout method or no auto-started timer is configured by annotation or deployment plan. This differs from OpenEJB 2.x behavior, which did not create a TimerService for a bean which did not have a timeout method. There's nothing in the spec which says a timeout-less bean cannot call getTimerService. So, we now have NullEjbTimerServiceImpl, which does not do very much...


Constructor Summary
NullEjbTimerServiceImpl()
           
 
Method Summary
 javax.ejb.Timer createTimer(Object primaryKey, Method timeoutMethod, Date initialExpiration, long intervalDuration, javax.ejb.TimerConfig timerConfig)
           
 javax.ejb.Timer createTimer(Object primaryKey, Method timeoutMethod, Date expiration, javax.ejb.TimerConfig timerConfig)
           
 javax.ejb.Timer createTimer(Object primaryKey, Method timeoutMethod, long initialDuration, long intervalDuration, javax.ejb.TimerConfig timerConfig)
           
 javax.ejb.Timer createTimer(Object primaryKey, Method timeoutMethod, long duration, javax.ejb.TimerConfig timerConfig)
           
 javax.ejb.Timer createTimer(Object primaryKey, Method timeoutMethod, javax.ejb.ScheduleExpression schedule, javax.ejb.TimerConfig timerConfig)
           
 javax.ejb.Timer getTimer(long id)
           
 Collection<javax.ejb.Timer> getTimers(Object primaryKey)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullEjbTimerServiceImpl

public NullEjbTimerServiceImpl()
Method Detail

createTimer

public javax.ejb.Timer createTimer(Object primaryKey,
                                   Method timeoutMethod,
                                   javax.ejb.ScheduleExpression schedule,
                                   javax.ejb.TimerConfig timerConfig)
Specified by:
createTimer in interface EjbTimerService

createTimer

public javax.ejb.Timer createTimer(Object primaryKey,
                                   Method timeoutMethod,
                                   Date initialExpiration,
                                   long intervalDuration,
                                   javax.ejb.TimerConfig timerConfig)
Specified by:
createTimer in interface EjbTimerService

createTimer

public javax.ejb.Timer createTimer(Object primaryKey,
                                   Method timeoutMethod,
                                   Date expiration,
                                   javax.ejb.TimerConfig timerConfig)
Specified by:
createTimer in interface EjbTimerService

createTimer

public javax.ejb.Timer createTimer(Object primaryKey,
                                   Method timeoutMethod,
                                   long initialDuration,
                                   long intervalDuration,
                                   javax.ejb.TimerConfig timerConfig)
Specified by:
createTimer in interface EjbTimerService

createTimer

public javax.ejb.Timer createTimer(Object primaryKey,
                                   Method timeoutMethod,
                                   long duration,
                                   javax.ejb.TimerConfig timerConfig)
Specified by:
createTimer in interface EjbTimerService

getTimer

public javax.ejb.Timer getTimer(long id)
Specified by:
getTimer in interface EjbTimerService

getTimers

public Collection<javax.ejb.Timer> getTimers(Object primaryKey)
Specified by:
getTimers in interface EjbTimerService

start

public void start()
           throws OpenEJBException
Specified by:
start in interface EjbTimerService
Throws:
OpenEJBException

stop

public void stop()
Specified by:
stop in interface EjbTimerService


Copyright © 1999-2012 The Apache Software Foundation. All Rights Reserved.