use of fish.payara.nucleus.notification.configuration.Notifier in project Payara by payara.
the class RequestTracingService method bootstrapNotifierList.
/**
* Configures notifiers with request tracing and starts any enabled ones.
* If no options are set then the log notifier is automatically turned on.
* @since 4.1.2.173
*/
public void bootstrapNotifierList() {
executionOptions.resetNotifierExecutionOptions();
if (configuration.getNotifierList() != null) {
for (Notifier notifier : configuration.getNotifierList()) {
ConfigView view = ConfigSupport.getImpl(notifier);
NotifierConfigurationType annotation = view.getProxyType().getAnnotation(NotifierConfigurationType.class);
executionOptions.addNotifierExecutionOption(executionOptionsFactoryStore.get(annotation.type()).build(notifier));
}
}
if (executionOptions.getNotifierExecutionOptionsList().isEmpty()) {
// Add logging execution options by default
LogNotifierExecutionOptions logNotifierExecutionOptions = new LogNotifierExecutionOptions();
logNotifierExecutionOptions.setEnabled(true);
executionOptions.addNotifierExecutionOption(logNotifierExecutionOptions);
}
}
Aggregations