org.apache.http.nio.conn.NoopIOSessionStrategy Java Examples
The following examples show how to use
org.apache.http.nio.conn.NoopIOSessionStrategy.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HttpClientFactory.java From log4j2-elasticsearch with Apache License 2.0 | 6 votes |
public HttpClientFactory build() { if (this.sslSocketFactory == null) { this.sslSocketFactory = SSLConnectionSocketFactory.getSocketFactory(); } if (this.plainSocketFactory == null) { this.plainSocketFactory = PlainConnectionSocketFactory.getSocketFactory(); } if (this.httpIOSessionStrategy == null) { this.httpIOSessionStrategy = NoopIOSessionStrategy.INSTANCE; } if (this.httpsIOSessionStrategy == null) { this.httpsIOSessionStrategy = SSLIOSessionStrategy.getSystemDefaultStrategy(); } return new HttpClientFactory(this); }
Example #2
Source File: AsyncHttpClientGenerator.java From cetty with Apache License 2.0 | 5 votes |
@Override protected Registry<SchemeIOSessionStrategy> registry() { return RegistryBuilder .<SchemeIOSessionStrategy>create() .register("http", NoopIOSessionStrategy.INSTANCE) .register("https", buildSSLIOSessionStrategy()) .build(); }
Example #3
Source File: RestClient.java From light with Apache License 2.0 | 5 votes |
private Registry<SchemeIOSessionStrategy> asyncRegistry() throws Exception { // Allow TLSv1 protocol only SSLIOSessionStrategy sslSessionStrategy = new SSLIOSessionStrategy( sslContext(), new String[] { "TLSv1" }, null, hostnameVerifier()); // Create a registry of custom connection session strategies for supported // protocol schemes. return RegistryBuilder.<SchemeIOSessionStrategy>create() .register("http", NoopIOSessionStrategy.INSTANCE) .register("https", sslSessionStrategy) .build(); }
Example #4
Source File: AutoCleanedPoolingNHttpClientConnectionManager.java From caravan with Apache License 2.0 | 4 votes |
protected static Registry<SchemeIOSessionStrategy> getDefaultRegistry() { return RegistryBuilder.<SchemeIOSessionStrategy>create().register("http", NoopIOSessionStrategy.INSTANCE) .register("https", SSLIOSessionStrategy.getDefaultStrategy()).build(); }