Search in sources :

Example 1 with ApacheHttpTransport

use of org.eclipse.scout.rt.shared.http.transport.ApacheHttpTransport in project scout.rt by eclipse.

the class ApacheHttpTransportFactory method newHttpTransport.

@Override
public HttpTransport newHttpTransport(IHttpTransportManager manager) {
    HttpClientBuilder builder = HttpClients.custom();
    installConfigurableProxySelector(builder);
    installMultiSessionCookieStore(builder);
    setConnectionKeepAliveAndRetrySettings(builder);
    HttpClientConnectionManager cm = getConfiguredConnectionManager();
    if (cm != null) {
        builder.setConnectionManager(cm);
    }
    interceptNewHttpTransport(builder, manager);
    manager.interceptNewHttpTransport(new ApacheHttpTransportBuilder(builder, cm));
    return new ApacheHttpTransport(builder.build());
}
Also used : HttpClientBuilder(org.apache.http.impl.client.HttpClientBuilder) PoolingHttpClientConnectionManager(org.apache.http.impl.conn.PoolingHttpClientConnectionManager) HttpClientConnectionManager(org.apache.http.conn.HttpClientConnectionManager) ApacheHttpTransport(org.eclipse.scout.rt.shared.http.transport.ApacheHttpTransport)

Aggregations

HttpClientConnectionManager (org.apache.http.conn.HttpClientConnectionManager)1 HttpClientBuilder (org.apache.http.impl.client.HttpClientBuilder)1 PoolingHttpClientConnectionManager (org.apache.http.impl.conn.PoolingHttpClientConnectionManager)1 ApacheHttpTransport (org.eclipse.scout.rt.shared.http.transport.ApacheHttpTransport)1