protected Config stateToConfig(State state) { String proxyUrlKey = getPrefixedPropertyName(PROXY_URL_KEY); String proxyPortKey = getPrefixedPropertyName(PROXY_PORT_KEY); String proxyHostportKey = getPrefixedPropertyName(PROXY_HOSTPORT_KEY); Config cfg = ConfigFactory.empty(); if (state.contains(proxyUrlKey)) { cfg = cfg.withValue(PROXY_URL_KEY, ConfigValueFactory.fromAnyRef(state.getProp(proxyUrlKey))); } if (state.contains(proxyPortKey)) { cfg = cfg.withValue(PROXY_PORT_KEY, ConfigValueFactory.fromAnyRef(state.getPropAsInt(proxyPortKey))); } if (state.contains(proxyHostportKey)) { cfg = cfg.withValue(PROXY_HOSTPORT_KEY, ConfigValueFactory.fromAnyRef(state.getProp(proxyHostportKey))); } return cfg; }
protected Config stateToConfig(State state) { String proxyUrlKey = getPrefixedPropertyName(PROXY_URL_KEY); String proxyPortKey = getPrefixedPropertyName(PROXY_PORT_KEY); String proxyHostportKey = getPrefixedPropertyName(PROXY_HOSTPORT_KEY); Config cfg = ConfigFactory.empty(); if (state.contains(proxyUrlKey)) { cfg = cfg.withValue(PROXY_URL_KEY, ConfigValueFactory.fromAnyRef(state.getProp(proxyUrlKey))); } if (state.contains(proxyPortKey)) { cfg = cfg.withValue(PROXY_PORT_KEY, ConfigValueFactory.fromAnyRef(state.getPropAsInt(proxyPortKey))); } if (state.contains(proxyHostportKey)) { cfg = cfg.withValue(PROXY_HOSTPORT_KEY, ConfigValueFactory.fromAnyRef(state.getProp(proxyHostportKey))); } return cfg; }