Package org.jboss.as.ejb3.timerservice
Class TimerServiceRegistryImpl
java.lang.Object
org.jboss.as.ejb3.timerservice.TimerServiceRegistryImpl
- All Implemented Interfaces:
TimerServiceRegistry
A registry to which individual
timer services can register to (and un-register from). The main purpose
of this registry is to provide an implementation of #getAllActiveTimers() which returns all
active timers after querying each of the timer services registered
with this registry.
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 -
Method Summary
Modifier and TypeMethodDescriptionCollection<jakarta.ejb.Timer>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.
-
Constructor Details
-
TimerServiceRegistryImpl
public TimerServiceRegistryImpl()
-
-
Method Details
-
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
Description copied from interface:TimerServiceRegistryReturns the timers for all registered timer services.- Specified by:
getAllTimersin interfaceTimerServiceRegistry- Returns:
- a collection of timers
-