Search in sources :

Example 1 with KeyGenerationEvent

use of org.xdi.oxauth.service.cdi.event.KeyGenerationEvent in project oxAuth by GluuFederation.

the class KeyGeneratorTimer method initTimer.

public void initTimer() {
    log.debug("Initializing Key Generator Timer");
    this.isActive = new AtomicBoolean(false);
    int interval = appConfiguration.getKeyRegenerationInterval();
    if (interval <= 0) {
        interval = DEFAULT_INTERVAL;
    }
    interval = interval * 3600;
    timerEvent.fire(new TimerEvent(new TimerSchedule(interval, interval), new KeyGenerationEvent(), Scheduled.Literal.INSTANCE));
}
Also used : AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TimerSchedule(org.xdi.service.timer.schedule.TimerSchedule) KeyGenerationEvent(org.xdi.oxauth.service.cdi.event.KeyGenerationEvent) TimerEvent(org.xdi.service.timer.event.TimerEvent)

Aggregations

AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 KeyGenerationEvent (org.xdi.oxauth.service.cdi.event.KeyGenerationEvent)1 TimerEvent (org.xdi.service.timer.event.TimerEvent)1 TimerSchedule (org.xdi.service.timer.schedule.TimerSchedule)1