Search in sources :

Example 6 with Notifier

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);
    }
}
Also used : NotifierConfigurationType(fish.payara.nucleus.notification.configuration.NotifierConfigurationType) LogNotifier(fish.payara.nucleus.notification.log.LogNotifier) Notifier(fish.payara.nucleus.notification.configuration.Notifier) LogNotifierExecutionOptions(fish.payara.nucleus.notification.log.LogNotifierExecutionOptions)

Aggregations

Notifier (fish.payara.nucleus.notification.configuration.Notifier)6 NotifierConfigurationType (fish.payara.nucleus.notification.configuration.NotifierConfigurationType)6 ConfigView (org.jvnet.hk2.config.ConfigView)4 Config (com.sun.enterprise.config.serverbeans.Config)3 ColumnFormatter (com.sun.enterprise.util.ColumnFormatter)3 LogNotifierExecutionOptions (fish.payara.nucleus.notification.log.LogNotifierExecutionOptions)3 BaseNotifierService (fish.payara.nucleus.notification.service.BaseNotifierService)3 HashMap (java.util.HashMap)3 Properties (java.util.Properties)3 ActionReport (org.glassfish.api.ActionReport)3 ServiceHandle (org.glassfish.hk2.api.ServiceHandle)3 LogNotifier (fish.payara.nucleus.notification.log.LogNotifier)2 MonitoredAttribute (fish.payara.jmx.monitoring.configuration.MonitoredAttribute)1 MonitoringServiceConfiguration (fish.payara.jmx.monitoring.configuration.MonitoringServiceConfiguration)1 Checker (fish.payara.nucleus.healthcheck.configuration.Checker)1 HealthCheckServiceConfiguration (fish.payara.nucleus.healthcheck.configuration.HealthCheckServiceConfiguration)1 HoggingThreadsChecker (fish.payara.nucleus.healthcheck.configuration.HoggingThreadsChecker)1 StuckThreadsChecker (fish.payara.nucleus.healthcheck.configuration.StuckThreadsChecker)1 ThresholdDiagnosticsChecker (fish.payara.nucleus.healthcheck.configuration.ThresholdDiagnosticsChecker)1 BaseHealthCheck (fish.payara.nucleus.healthcheck.preliminary.BaseHealthCheck)1