Package org.apache.logging.log4j.core.config

Examples of org.apache.logging.log4j.core.config.FileConfigurationMonitor$ReconfigurationWorker


                } else if ("schema".equalsIgnoreCase(key)) {
                    schema = value;
                } else if ("monitorInterval".equalsIgnoreCase(key)) {
                    final int interval = Integer.parseInt(value);
                    if (interval > 0 && configFile != null) {
                        monitor = new FileConfigurationMonitor(this, configFile, listeners, interval);
                    }
                } else if ("advertiser".equalsIgnoreCase(key)) {
                    createAdvertiser(value, configSource, buffer, "text/xml");
                }
            }
View Full Code Here


                } else if ("schema".equalsIgnoreCase(key)) {
                    schema = value;
                } else if ("monitorInterval".equalsIgnoreCase(key)) {
                    final int interval = Integer.parseInt(value);
                    if (interval > 0 && configFile != null) {
                        monitor = new FileConfigurationMonitor(this, configFile, listeners, interval);
                    }
                } else if ("advertiser".equalsIgnoreCase(key)) {
                    createAdvertiser(value, configSource, buffer, "text/xml");
                }
            }
View Full Code Here

                } else if ("name".equalsIgnoreCase(key)) {
                    setName(value);
                } else if ("monitorInterval".equalsIgnoreCase(key)) {
                    final int interval = Integer.parseInt(value);
                    if (interval > 0 && configFile != null) {
                        monitor = new FileConfigurationMonitor(this, configFile, listeners, interval);
                    }
                } else if ("advertiser".equalsIgnoreCase(key)) {
                    createAdvertiser(value, configSource, buffer, "application/json");
                }
            }
View Full Code Here

                } else if ("schema".equalsIgnoreCase(key)) {
                    schema = value;
                } else if ("monitorInterval".equalsIgnoreCase(key)) {
                    final int interval = Integer.parseInt(value);
                    if (interval > 0 && configFile != null) {
                        monitor = new FileConfigurationMonitor(this, configFile, listeners, interval);
                    }
                } else if ("advertiser".equalsIgnoreCase(key)) {
                    createAdvertiser(value, configSource, buffer, "text/xml");
                }
            }
View Full Code Here

                } else if ("name".equalsIgnoreCase(key)) {
                    setName(value);
                } else if ("monitorInterval".equalsIgnoreCase(key)) {
                    final int interval = Integer.parseInt(value);
                    if (interval > 0 && configFile != null) {
                        monitor = new FileConfigurationMonitor(this, configFile, listeners, interval);
                    }
                } else if ("advertiser".equalsIgnoreCase(key)) {
                    createAdvertiser(value, configSource, buffer, "application/json");
                }
            }
View Full Code Here

        contextConfigurer.configure(context);
        ArgumentCaptor<ConfigurationMonitor> captor = ArgumentCaptor.forClass(ConfigurationMonitor.class);
        verify(configuration).setConfigurationMonitor(captor.capture());

        assertThat(captor.getValue() instanceof FileConfigurationMonitor, is(true));
        FileConfigurationMonitor monitor = (FileConfigurationMonitor) captor.getValue();
        assertThat(MONITOR_INTERVAL, equalTo(ClassUtils.getFieldValue(monitor, INTERVAL_PROPERTY, true)));
    }
View Full Code Here

                configFile = new File(configuration.getName());
            }

            if (configFile != null)
            {
                configuration.setConfigurationMonitor(new FileConfigurationMonitor(
                        (Reconfigurable) configuration,
                        configFile,
                        getListeners(configuration),
                        DEFAULT_MONITOR_INTERVAL_SECS));
            }
View Full Code Here

TOP

Related Classes of org.apache.logging.log4j.core.config.FileConfigurationMonitor$ReconfigurationWorker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.