// --- PRIVATE METHODS ----- private void setValue(LbConfig lbConfig, String name) { if (name.equals(LoadbalancerReader.RESP_TIMEOUT)) { _value = lbConfig.getResponseTimeoutInSeconds(); } else if (name.equals(LoadbalancerReader.RELOAD_INTERVAL)) { _value = lbConfig.getReloadPollIntervalInSeconds(); } _name = name; }
public static PropertyReader[] getPropertyReaders(LbConfig _lbConfig) { Properties properties = new Properties(); properties.setProperty(LoadbalancerReader.HTTPS_ROUTING, _lbConfig.getHttpsRouting()); properties.setProperty(LoadbalancerReader.REQ_MONITOR_DATA, _lbConfig.getMonitoringEnabled()); properties.setProperty( LoadbalancerReader.RELOAD_INTERVAL, _lbConfig.getReloadPollIntervalInSeconds()); properties.setProperty( LoadbalancerReader.RESP_TIMEOUT, _lbConfig.getResponseTimeoutInSeconds()); Iterator<Property> propertyList = _lbConfig.getProperty().iterator(); while (propertyList.hasNext()) { Property property = propertyList.next(); if (property.getName().equals(LbConfig.LAST_APPLIED_PROPERTY) || property.getName().equals(LbConfig.LAST_EXPORTED_PROPERTY)) { continue; } properties.setProperty(property.getName(), property.getValue()); } return getPropertyReaders(properties); }