public interface ServiceTimerProvider
If a feature raises a timer to be processed by a feature execution script, it should subsequently call 'featureHasFinished'. The timer, when firing, will cause a new feature execution point (and associated execution script) to be triggered, which can only happen properly if the feature raising the timer has given control back to the core via a 'featureHasFinished'.
Care needs to be taken to make the expiry time of a timer large enough to allow any features running after the current feature in the execution script to complete successfully before the timer fires, otherwise the timer won't trigger the 'onTimer' feature execution script and the timer event will be dropped.
Modifier and Type | Method and Description |
---|---|
void |
cancelTimer(javax.slee.facilities.TimerID timerId)
Cancel the timer with the provided 'timerId', if it exists.
|
void |
clearTimer(javax.slee.facilities.TimerID timerId)
Clear the timer with the provided 'timerId', if it exists.
|
java.lang.String |
getFeatureNameForTimer(javax.slee.facilities.TimerID timerID)
Get the feature name that was provided when the timer was set.
|
javax.slee.ActivityContextInterface |
getServiceTimerAci() |
void |
registerTimer(java.lang.String featureName,
javax.slee.facilities.TimerID timerId,
javax.slee.ActivityContextInterface aci)
Register an already raised timer with the ServiceTimerProvider.
|
void |
registerTimer(javax.slee.facilities.TimerID timerId,
javax.slee.ActivityContextInterface aci)
Register an already raised timer with the ServiceTimerProvider.
|
javax.slee.facilities.TimerID |
setPeriodicTimer(long startTime,
long period,
int numRepetitions)
Raise a new periodic service feature timer.
|
javax.slee.facilities.TimerID |
setPeriodicTimer(long startTime,
long period,
int numRepetitions,
javax.slee.facilities.TimerOptions options)
Raise a new periodic service feature timer.
|
javax.slee.facilities.TimerID |
setPeriodicTimer(java.lang.String featureName,
long startTime,
long period,
int numRepetitions)
Raise a new periodic service feature timer.
|
javax.slee.facilities.TimerID |
setPeriodicTimer(java.lang.String featureName,
long startTime,
long period,
int numRepetitions,
javax.slee.facilities.TimerOptions options)
Raise a new periodic service feature timer.
|
javax.slee.facilities.TimerID |
setTimer(long expiryTime)
Raise a new service feature timer.
|
javax.slee.facilities.TimerID |
setTimer(long expiryTime,
javax.slee.facilities.TimerOptions options)
Raise a new service feature timer.
|
javax.slee.facilities.TimerID |
setTimer(java.lang.String featureName,
long expiryTime)
Raise a new service feature timer.
|
javax.slee.facilities.TimerID |
setTimer(java.lang.String featureName,
long expiryTime,
javax.slee.facilities.TimerOptions options)
Raise a new service feature timer.
|
boolean |
timerIsSet(javax.slee.facilities.TimerID timerId)
Check if a timer with the provided timerID is currently set and registered with the provider.
|
javax.slee.facilities.TimerID setTimer(long expiryTime)
expiryTime
- The timestamp when the timer is supposed to expire.javax.slee.facilities.TimerID setTimer(long expiryTime, javax.slee.facilities.TimerOptions options)
expiryTime
- The timestamp when the timer is supposed to expire.options
- The SLEE TimerOptions that shall be used to raise the timer.javax.slee.facilities.TimerID setTimer(java.lang.String featureName, long expiryTime)
featureName
- The name of the feature to deliver TimerEvents to.expiryTime
- The timestamp when the timer is supposed to expire.javax.slee.facilities.TimerID setTimer(java.lang.String featureName, long expiryTime, javax.slee.facilities.TimerOptions options)
featureName
- The name of the feature to deliver TimerEvents to.expiryTime
- The timestamp when the timer is supposed to expire.options
- The SLEE TimerOptions that shall be used to raise the timer.javax.slee.facilities.TimerID setPeriodicTimer(long startTime, long period, int numRepetitions)
startTime
- The timestamp when the timer should fire for the first time.period
- The amount of time to wait between each firing of the timer.numRepetitions
- The maximum number of times that the timer should fire (0 for no limit)javax.slee.facilities.TimerID setPeriodicTimer(long startTime, long period, int numRepetitions, javax.slee.facilities.TimerOptions options)
startTime
- The timestamp when the timer should fire for the first time.period
- The amount of time to wait between each firing of the timer.numRepetitions
- The maximum number of times that the timer should fire (0 for no limit)options
- The SLEE TimerOptions that shall be used to raise the timer.javax.slee.facilities.TimerID setPeriodicTimer(java.lang.String featureName, long startTime, long period, int numRepetitions)
featureName
- The name of the feature to deliver TimerEvents to.startTime
- The timestamp when the timer should fire for the first time.period
- The amount of time to wait between each firing of the timer.numRepetitions
- The maximum number of times that the timer should fire (0 for no limit)javax.slee.facilities.TimerID setPeriodicTimer(java.lang.String featureName, long startTime, long period, int numRepetitions, javax.slee.facilities.TimerOptions options)
featureName
- The name of the feature to deliver TimerEvents to.startTime
- The timestamp when the timer should fire for the first time.period
- The amount of time to wait between each firing of the timer.numRepetitions
- The maximum number of times that the timer should fire (0 for no limit)options
- The SLEE TimerOptions that shall be used to raise the timer.void registerTimer(javax.slee.facilities.TimerID timerId, javax.slee.ActivityContextInterface aci) throws ServiceTimerAlreadyExistsException
timerId
- The SLEE timer id of the raised timer.aci
- The ActivityContextInterface the timer was raised on and to which the service's main Sbb shall be attached.ServiceTimerAlreadyExistsException
- If this timer has already been registered.void registerTimer(java.lang.String featureName, javax.slee.facilities.TimerID timerId, javax.slee.ActivityContextInterface aci) throws ServiceTimerAlreadyExistsException
featureName
- The name of the feature to deliver TimerEvents to.timerId
- The SLEE timer id of the raised timer.aci
- The ActivityContextInterface the timer was raised on and to which the service's main Sbb shall be attached.ServiceTimerAlreadyExistsException
- If this timer has already been registered.void cancelTimer(javax.slee.facilities.TimerID timerId)
timerId
- The id of the timer to be cancelled and de-registered.void clearTimer(javax.slee.facilities.TimerID timerId)
timerId
- The id of the timer to be cancelled and de-registered.boolean timerIsSet(javax.slee.facilities.TimerID timerId)
timerId
- The SLEE Timer ID of the timer to check.true
if the timer was set and registered with the provider; false
otherwise.java.lang.String getFeatureNameForTimer(javax.slee.facilities.TimerID timerID)
timerID
- the timerjavax.slee.ActivityContextInterface getServiceTimerAci()
Copyright © OpenCloud. All Rights Reserved.