use of fish.payara.nucleus.notification.configuration.NotifierType in project Payara by payara.
the class NotificationService method bootstrapNotificationService.
public void bootstrapNotificationService() {
if (configuration != null) {
executionOptions = new NotificationExecutionOptions();
executionOptions.setEnabled(Boolean.parseBoolean(configuration.getEnabled()));
for (NotifierConfiguration notifierConfiguration : configuration.getNotifierConfigurationList()) {
NotifierType type = null;
try {
ConfigView view = ConfigSupport.getImpl(notifierConfiguration);
NotifierConfigurationType annotation = view.getProxyType().getAnnotation(NotifierConfigurationType.class);
type = annotation.type();
executionOptions.addNotifierConfigurationExecutionOption(factoryStore.get(type).build(notifierConfiguration));
} catch (UnsupportedEncodingException e) {
logger.log(Level.SEVERE, "Notifier configuration with type " + type + " cannot be configured due to encoding problems in configuration parameters", e);
}
}
if (executionOptions.isEnabled()) {
logger.info("Payara Notification Service bootstrapped with configuration: " + executionOptions);
}
}
}
Aggregations