Search in sources :

Example 1 with UpdateScriptEvent

use of org.xdi.service.cdi.event.UpdateScriptEvent in project oxCore by GluuFederation.

the class CustomScriptManager method initTimer.

public void initTimer(List<CustomScriptType> supportedCustomScriptTypes) {
    this.supportedCustomScriptTypes = supportedCustomScriptTypes;
    this.isActive = new AtomicBoolean(false);
    this.lastFinishedTime = System.currentTimeMillis();
    final int delay = 30;
    final int interval = DEFAULT_INTERVAL;
    reload();
    timerEvent.fire(new TimerEvent(new TimerSchedule(delay, interval), new UpdateScriptEvent(), Scheduled.Literal.INSTANCE));
}
Also used : AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TimerSchedule(org.xdi.service.timer.schedule.TimerSchedule) TimerEvent(org.xdi.service.timer.event.TimerEvent) UpdateScriptEvent(org.xdi.service.cdi.event.UpdateScriptEvent)

Aggregations

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