alertService.save(alert);
final List<AlarmCallbackConfiguration> callConfigurations = alarmCallbackConfigurationService.getForStream(stream);
if (callConfigurations.size() > 0)
for (AlarmCallbackConfiguration configuration : callConfigurations) {
final AlarmCallback alarmCallback = alarmCallbackFactory.create(configuration);
try {
alarmCallback.call(stream, result);
} catch (Exception e) {
LOG.warn("Alarm callback <{}> failed. Skipping. Error was: {}", alarmCallback.getName(), new ExceptionStringFormatter(e));
}
}
else {
emailAlarmCallback.call(stream, result);
}