@Override public void configurationChanged(ConfigurationEvent event) { // Note that this method may be called several times if several config options // are changed. The effect is harmless except that we create and discard more // objects than we need to. LOG.debug("Config changed callback invoked with event {} {} {} {}", new Object[] { event.getPropertyName(), event.getPropertyValue(), event.getType(), event.isBeforeUpdate()}); if (!event.isBeforeUpdate()) { limiterStatsLogger.getCounter("config_changed").inc(); LOG.debug("Rebuilding limiter"); limiter = build(); } } };
private void loadConfigurations(String prefix) { ConcurrentCompositeConfiguration config = (ConcurrentCompositeConfiguration) DynamicPropertyFactory .getBackingConfigurationSource(); loadConfigurations(config, prefix); config.addConfigurationListener(event -> { if (event.getPropertyName().startsWith(prefix)) { LOG.info("Access rule have been changed. Reload configurations. Event=" + event.getType()); loadConfigurations(config, prefix); } }); }
private void loadConfigurations() { ConcurrentCompositeConfiguration config = (ConcurrentCompositeConfiguration) DynamicPropertyFactory .getBackingConfigurationSource(); loadConfigurations(config); config.addConfigurationListener(event -> { if (event.getPropertyName().startsWith(KEY_MAPPING_PREIX)) { LOG.info("Map rule have been changed. Reload configurations. Event=" + event.getType()); loadConfigurations(config); } }); }
@Override public void configurationChanged(ConfigurationEvent e) { if (e.getPropertyName() != null && e.getPropertyName().equalsIgnoreCase("gui.markColor")) { final Object propertyValue = e.getPropertyValue(); if (propertyValue instanceof MarkerColors) { markerColors = (MarkerColors) propertyValue; } else if (propertyValue instanceof String) { String value = (String) propertyValue; markerColors = MarkerColors.fromString(value); } } }
public void configurationChanged( ConfigurationEvent event ) { if ( event.getPropertyName() != null ) { if ( event.isBeforeUpdate() ) { listener.beforeConfigurationChange( registry, event.getPropertyName(), event.getPropertyValue() ); } else { listener.afterConfigurationChange( registry, event.getPropertyName(), event.getPropertyValue() ); } } }
public void configurationChanged( ConfigurationEvent event ) { if ( event.getPropertyName() != null ) { if ( event.isBeforeUpdate() ) { listener.beforeConfigurationChange( registry, event.getPropertyName(), event.getPropertyValue() ); } else { listener.afterConfigurationChange( registry, event.getPropertyName(), event.getPropertyValue() ); } } } }
public void configurationChanged( ConfigurationEvent event ) { if ( event.getPropertyName() != null ) { if ( event.isBeforeUpdate() ) { listener.beforeConfigurationChange( registry, event.getPropertyName(), event.getPropertyValue() ); } else { listener.afterConfigurationChange( registry, event.getPropertyName(), event.getPropertyValue() ); } } } }
ConfigurationListener listener = new ConfigurationListener() { @Override public void configurationChanged(ConfigurationEvent event) { if ( !event.isBeforeUpdate() ){ System.out.println(event.getPropertyName() + " " + event.getPropertyValue()); } } }; configuration.addConfigurationListener(listener);
/** * {@inheritDoc} */ @Override public void configurationChanged(ConfigurationEvent evt) { final String propertyName = evt.getPropertyName(); if (propertyName.equals(DroidGlobalProperty.BINARY_UPDATE_URL.getName())) { setEndpointUrl((String) evt.getPropertyValue()); } }
/** * {@inheritDoc} */ @Override public void configurationChanged(ConfigurationEvent evt) { final String propertyName = evt.getPropertyName(); if (propertyName.equals(DroidGlobalProperty.CONTAINER_UPDATE_URL.getName())) { setEndpointUrl((String) evt.getPropertyValue()); } }
/** * {@inheritDoc} */ @Override public void configurationChanged(ConfigurationEvent evt) { final String propertyName = evt.getPropertyName(); if (propertyName.equals(DroidGlobalProperty.CONTAINER_UPDATE_URL.getName())) { setEndpointUrl((String) evt.getPropertyValue()); } }
/** * {@inheritDoc} */ @Override public void configurationChanged(ConfigurationEvent evt) { final String propertyName = evt.getPropertyName(); if (propertyName.equals(DroidGlobalProperty.BINARY_UPDATE_URL.getName())) { setEndpointUrl((String) evt.getPropertyValue()); } }
@Override public void configurationChanged(ConfigurationEvent event) { StaticAbstractConfiguration.this.fireEvent(event.getType(), event.getPropertyName(), event.getPropertyValue(), event.isBeforeUpdate()); } };
@Override public synchronized void configurationChanged(ConfigurationEvent event) { if ((event.getType() == AbstractConfiguration.EVENT_ADD_PROPERTY || event.getType() == AbstractConfiguration.EVENT_SET_PROPERTY) && StringUtils.equalsIgnoreCase(LOGBACK_CONFIG_NAME, event.getPropertyName()) && event.getPropertyValue() != null && !event.isBeforeUpdate()) { System.out.println("Reloading logging config."); reloadLogging((String)event.getPropertyValue()); } } });
@Override public void configurationChanged(ConfigurationEvent event) { // Note that this method may be called several times if several config options // are changed. The effect is harmless except that we create and discard more // objects than we need to. LOG.debug("Config changed callback invoked with event {} {} {} {}", new Object[] { event.getPropertyName(), event.getPropertyValue(), event.getType(), event.isBeforeUpdate()}); if (!event.isBeforeUpdate()) { limiterStatsLogger.getCounter("config_changed").inc(); LOG.debug("Rebuilding limiter"); limiter = build(); } } };
public void configurationChanged(ConfigurationEvent event) { if (!event.isBeforeUpdate()) { // only display events after the modification was done System.out.println(name + " Received event!"); System.out.println(name + " Type = " + event.getType()); if (event.getPropertyName() != null) { System.out.println(name + " Property name = " + event.getPropertyName()); } if (event.getPropertyValue() != null) { System.out.println(name + " Property value = " + event.getPropertyValue()); } } } }
public SwitchAutoJump(OtrosApplication otrosApplication) { super(otrosApplication); configuration = getOtrosApplication().getConfiguration(); final boolean enabled = configuration.getBoolean(ConfKeys.JUMP_TO_CODE_AUTO_JUMP_ENABLED, true); Icon icon = getIcon(enabled); putValue(SMALL_ICON, icon); putValue(SHORT_DESCRIPTION, "Turn on/off automatic jump to code during browsing logs."); configuration.addConfigurationListener(event -> { if (event.getPropertyName() != null && event.getPropertyName().equals(ConfKeys.JUMP_TO_CODE_AUTO_JUMP_ENABLED)) { putValue(SMALL_ICON, getIcon(configuration.getBoolean(ConfKeys.JUMP_TO_CODE_AUTO_JUMP_ENABLED, true))); } }); }
/** * Reacts on configuration change events triggered by the delegate. These * events are passed to the registered configuration listeners. * * @param event the triggered event * @since 1.3 */ public void configurationChanged(ConfigurationEvent event) { // deliver reload events to registered listeners setDetailEvents(true); try { fireEvent(event.getType(), event.getPropertyName(), event .getPropertyValue(), event.isBeforeUpdate()); } finally { setDetailEvents(false); } }
/** * Event listener call back for configuration update events. This method is * called whenever one of the contained configurations was modified. It * invalidates this combined configuration. * * @param event the update event */ public void configurationChanged(ConfigurationEvent event) { if (event.getType() == AbstractFileConfiguration.EVENT_CONFIG_CHANGED) { fireEvent(event.getType(), event.getPropertyName(), event.getPropertyValue(), event.isBeforeUpdate()); } else if (!event.isBeforeUpdate()) { invalidate(); } }
/** * Event listener call back for configuration update events. This method is * called whenever one of the contained configurations was modified. It * invalidates this combined configuration. * * @param event the update event */ public void configurationChanged(ConfigurationEvent event) { if (event.getType() == AbstractFileConfiguration.EVENT_CONFIG_CHANGED) { fireEvent(event.getType(), event.getPropertyName(), event.getPropertyValue(), event.isBeforeUpdate()); } else if (!event.isBeforeUpdate()) { invalidate(); } }