@Override public void run() throws Throwable { new HttpClientConfiguratorLoader(config); } });
protected HttpClient getHttpClient() { if (this.httpClient == null) { HttpClientConfiguratorLoader configuratorLoader = new HttpClientConfiguratorLoader(this.state); this.httpClient = configuratorLoader.getConfigurator() .setStatePropertiesPrefix(ConfigurationKeys.SOURCE_CONN_PREFIX) .configure(this.state) .createClient(); } return this.httpClient; }
= new HttpClientConfiguratorLoader(workUnitState); this.httpClientConfigurator = httpClientConfiguratorLoader.getConfigurator(); this.httpClientConfigurator.setStatePropertiesPrefix(HTTP_CLIENT_CONFIG_PREFIX)
@Test public void testConfigureFromState() { HttpClientConfiguratorLoader loader = new HttpClientConfiguratorLoader(new State()); Assert.assertEquals(loader.getConfigurator().getClass(), DefaultHttpClientConfigurator.class); State state = new State(); state.setProp(HttpClientConfiguratorLoader.HTTP_CLIENT_CONFIGURATOR_TYPE_FULL_KEY, "default"); loader = new HttpClientConfiguratorLoader(state); Assert.assertEquals(loader.getConfigurator().getClass(), DefaultHttpClientConfigurator.class); }
public HttpClientBuilder getDefaultHttpClientBuilder() { HttpClientConfiguratorLoader clientConfiguratorLoader = new HttpClientConfiguratorLoader(getState()); clientConfiguratorLoader.getConfigurator().setStatePropertiesPrefix(AbstractHttpWriterBuilder.CONF_PREFIX); return clientConfiguratorLoader.getConfigurator().configure(getState()) .getBuilder().disableCookieManagement().useSystemProperties(); }
protected HttpClient getHttpClient() { if (this.httpClient == null) { HttpClientConfiguratorLoader configuratorLoader = new HttpClientConfiguratorLoader(this.state); this.httpClient = configuratorLoader.getConfigurator() .setStatePropertiesPrefix(ConfigurationKeys.SOURCE_CONN_PREFIX) .configure(this.state) .createClient(); } return this.httpClient; }
= new HttpClientConfiguratorLoader(workUnitState); this.httpClientConfigurator = httpClientConfiguratorLoader.getConfigurator(); this.httpClientConfigurator.setStatePropertiesPrefix(HTTP_CLIENT_CONFIG_PREFIX)
public HttpClientBuilder getDefaultHttpClientBuilder() { HttpClientConfiguratorLoader clientConfiguratorLoader = new HttpClientConfiguratorLoader(getState()); clientConfiguratorLoader.getConfigurator().setStatePropertiesPrefix(AbstractHttpWriterBuilder.CONF_PREFIX); return clientConfiguratorLoader.getConfigurator().configure(getState()) .getBuilder().disableCookieManagement().useSystemProperties(); }