Search in sources :

Example 1 with TimerOptions

use of javax.slee.facilities.TimerOptions in project charging-server by RestComm.

the class DiameterChargingServerSbb method createDefaultTimerOptions.

private static TimerOptions createDefaultTimerOptions() {
    TimerOptions timerOptions = new TimerOptions();
    timerOptions.setPreserveMissed(TimerPreserveMissed.ALL);
    return timerOptions;
}
Also used : TimerOptions(javax.slee.facilities.TimerOptions)

Example 2 with TimerOptions

use of javax.slee.facilities.TimerOptions in project smscgateway by RestComm.

the class DeliveryCommonSbb method rescheduleDeliveryTimer.

// *********
// Methods for managing of delivery timeout
protected void rescheduleDeliveryTimer(int smsSetSize) {
    this.cancelDeliveryTimer();
    if (this.timerFacility != null) {
        int multiplier = getMaxMessagesPerStep() != null ? Math.min(smsSetSize, getMaxMessagesPerStep()) : smsSetSize;
        int adaptedDeliveryTimeout = smscPropertiesManagement.getDeliveryTimeout() + smscPropertiesManagement.getDeliveryTimeoutDeltaPerMessage() * multiplier;
        long startTime = System.currentTimeMillis() + 1000 * adaptedDeliveryTimeout;
        TimerOptions options = new TimerOptions();
        ActivityContextInterface activity = getSchedulerActivityContextInterface();
        TimerID timer = this.timerFacility.setTimer(activity, null, startTime, options);
        setDeliveryTimerID(timer);
    }
}
Also used : ActivityContextInterface(javax.slee.ActivityContextInterface) TimerID(javax.slee.facilities.TimerID) TimerOptions(javax.slee.facilities.TimerOptions)

Example 3 with TimerOptions

use of javax.slee.facilities.TimerOptions in project smscgateway by RestComm.

the class ChargingSbb method createDefaultTimerOptions.

private static TimerOptions createDefaultTimerOptions() {
    TimerOptions timerOptions = new TimerOptions();
    timerOptions.setPreserveMissed(TimerPreserveMissed.ALL);
    return timerOptions;
}
Also used : TimerOptions(javax.slee.facilities.TimerOptions)

Aggregations

TimerOptions (javax.slee.facilities.TimerOptions)3 ActivityContextInterface (javax.slee.ActivityContextInterface)1 TimerID (javax.slee.facilities.TimerID)1