Package org.jboss.as.ejb3.timerservice
Class TimerServiceRegistryImpl
- java.lang.Object
-
- org.jboss.as.ejb3.timerservice.TimerServiceRegistryImpl
-
- All Implemented Interfaces:
TimerServiceRegistry
public class TimerServiceRegistryImpl extends Object implements TimerServiceRegistry
A registry to which individualtimer servicescan register to (and un-register from). The main purpose of this registry is to provide an implementation of#getAllActiveTimers()which returns allactive timersafter querying each of thetimer servicesregistered with thisregistry. Typical use of this registry is to maintain one instance of this registry, per deployment unit (also known as Jakarta Enterprise Beans module) and register the timer services of all Jakarta Enterprise Beans components that belong to that deployment unit. Effectively, such an instance can then be used to fetch all active timers that are applicable to that deployment unit (a.k.a Jakarta Enterprise Beans module).- Author:
- Jaikiran Pai
-
-
Constructor Summary
Constructors Constructor Description TimerServiceRegistryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<jakarta.ejb.Timer>getAllTimers()Returns the timers for all registered timer services.voidregisterTimerService(jakarta.ejb.TimerService service)Registers the specified timer service.voidunregisterTimerService(jakarta.ejb.TimerService service)Unregisters the specified timer service.
-
-
-
Method Detail
-
registerTimerService
public void registerTimerService(jakarta.ejb.TimerService service)
Description copied from interface:TimerServiceRegistryRegisters the specified timer service.- Specified by:
registerTimerServicein interfaceTimerServiceRegistry- Parameters:
service- a timer service
-
unregisterTimerService
public void unregisterTimerService(jakarta.ejb.TimerService service)
Description copied from interface:TimerServiceRegistryUnregisters the specified timer service.- Specified by:
unregisterTimerServicein interfaceTimerServiceRegistry- Parameters:
service- a timer service
-
getAllTimers
public Collection<jakarta.ejb.Timer> getAllTimers()
Description copied from interface:TimerServiceRegistryReturns the timers for all registered timer services.- Specified by:
getAllTimersin interfaceTimerServiceRegistry- Returns:
- a collection of timers
-
-