use of org.xdi.service.timer.event.TimerEvent in project oxAuth by GluuFederation.
the class CleanerTimer method initTimer.
public void initTimer() {
log.debug("Initializing Cleaner Timer");
this.isActive = new AtomicBoolean(false);
int interval = appConfiguration.getCleanServiceInterval();
if (interval <= 0) {
interval = DEFAULT_INTERVAL;
}
cleanerEvent.fire(new TimerEvent(new TimerSchedule(30, 30), new CleanerEvent(), Scheduled.Literal.INSTANCE));
}
use of org.xdi.service.timer.event.TimerEvent in project oxAuth by GluuFederation.
the class AppInitializer method initTimer.
public void initTimer() {
this.isActive = new AtomicBoolean(false);
this.lastFinishedTime = System.currentTimeMillis();
timerEvent.fire(new TimerEvent(new TimerSchedule(1 * 60, DEFAULT_INTERVAL), new AuthConfigurationEvent(), Scheduled.Literal.INSTANCE));
}
use of org.xdi.service.timer.event.TimerEvent 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));
}
use of org.xdi.service.timer.event.TimerEvent in project oxCore by GluuFederation.
the class TimerJob method execute.
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
try {
TimerEvent timerEvent = (TimerEvent) context.getJobDetail().getJobDataMap().get(KEY_TIMER_EVENT);
if (timerEvent == null) {
return;
}
log.debug("Fire timer event [{}] with qualifiers {}", timerEvent.getTargetEvent().getClass().getName(), timerEvent.getQualifiers());
beanManager.fireEvent(timerEvent.getTargetEvent(), timerEvent.getQualifiers());
} catch (Exception ex) {
throw new JobExecutionException(ex);
}
}
use of org.xdi.service.timer.event.TimerEvent in project oxTrust by GluuFederation.
the class MetadataValidationTimer method initTimer.
public void initTimer() {
log.debug("Initializing Metadata Validation Timer");
final int delay = 30;
final int interval = DEFAULT_INTERVAL;
timerEvent.fire(new TimerEvent(new TimerSchedule(delay, interval), new MetadataValidationEvent(), Scheduled.Literal.INSTANCE));
}
Aggregations