@Override public String toString() { return new ToStringBuilder(this) .append("base-url", m_baseURL) .append("username", m_user) .append("password", m_password.replaceAll(".", "*")) .append("timeout", m_timeout) .append("retries", m_retries) .append(useSystemProxy.name(), m_useSystemProxy) .toString(); }
boolean getUseSystemProxy(){ return Boolean.parseBoolean(extractValue(useSystemProxy.name())); }
@Test public void shouldExtractUseSystemPropertyAsPrefix() { HttpNotificationStrategy strategy = createNotificationStrategyWithSingleArgument(useSystemProxy.name()+"WithSuffix", "true"); assertEquals(true, strategy.getUseSystemProxy()); }
protected boolean getUseSystemProxy() { String useSystemProxy = getValueFromSwitchOrProp("Use System Proxy", HttpClientWrapperConfigHelper.PARAMETER_KEYS.useSystemProxy.name(), getUseSystemProxyPropertyName()); if (useSystemProxy == null) { LOG.info("useSystemProxy is not specified as a notification command switch or via system property {}. Setting it to true (use system proxy settings).", getUseSystemProxyPropertyName()); useSystemProxy="true"; // legacy behaviour } return Boolean.parseBoolean(useSystemProxy); }
public static void setUseSystemProxyIfDefined(HttpClientWrapper httpClientWrapper, Map<String, Object> keyedParameters) { if (ParameterMap.getKeyedBoolean(keyedParameters, useSystemProxy.getKey(), false)) { httpClientWrapper.useSystemProxySettings(); LOG.debug("setting useSystemProxySettings() on HttpClientWrapper"); } }
@Override public String toString() { return new ToStringBuilder(this) .append("base-url", m_baseURL) .append("username", m_user) .append("password", m_password.replaceAll(".", "*")) .append("timeout", m_timeout) .append("retries", m_retries) .append(useSystemProxy.name(), m_useSystemProxy) .toString(); }
@Test public void shouldExtractUseSystemProperty() { HttpNotificationStrategy strategy = createNotificationStrategyWithSingleArgument(useSystemProxy.name(), "true"); assertEquals(true, strategy.getUseSystemProxy()); }