public class TimerServiceRegistry extends Object
TimerService
instances used by sessions.
Registry is intended to be used at the application startup to register all required TimerServices
so it can start operate as soon as it is active even if the session are not yet active.Modifier and Type | Field and Description |
---|---|
static String |
TIMER_SERVICE_SUFFIX |
Constructor and Description |
---|
TimerServiceRegistry() |
Modifier and Type | Method and Description |
---|---|
org.drools.core.time.TimerService |
get(String id)
Returns TimerService instance registered under given key
|
static TimerServiceRegistry |
getInstance() |
void |
registerTimerService(String id,
org.drools.core.time.TimerService timerService)
Registers timerServie under given id.
|
org.drools.core.time.TimerService |
remove(String id)
Removes TimerService from the registry.
|
public static final String TIMER_SERVICE_SUFFIX
public static TimerServiceRegistry getInstance()
public void registerTimerService(String id, org.drools.core.time.TimerService timerService)
id
- key used to get hold of the timer service instancetimerService
- fully initialized TimerService instancepublic org.drools.core.time.TimerService get(String id)
id
- timer service identifierpublic org.drools.core.time.TimerService remove(String id)
id
- timer service identifierCopyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.