Package org.apache.http.nio.conn.scheme

Examples of org.apache.http.nio.conn.scheme.SchemeRegistry


        TrustManager[] tm = tmf.getTrustManagers();

        SSLContext clientSSLContext = SSLContext.getInstance("TLS");
        clientSSLContext.init(null, tm, null);

        SchemeRegistry schemeRegistry = new SchemeRegistry();
        schemeRegistry.register(new Scheme("http", 80, null));
        schemeRegistry.register(new Scheme("https", 443, new SSLLayeringStrategy(clientSSLContext)));
        return new PoolingClientConnectionManager(ioreactor, schemeRegistry);
    }
View Full Code Here


        return new DefaultConnectingIOReactor(2, new BasicHttpParams());
    }

    protected PoolingClientConnectionManager createConnectionManager(
            final ConnectingIOReactor ioreactor) throws Exception {
        SchemeRegistry schemeRegistry = new SchemeRegistry();
        schemeRegistry.register(new Scheme("http", 80, null));
        return new PoolingClientConnectionManager(ioreactor, schemeRegistry);
    }
View Full Code Here

        this.localServer.registerDefaultHandlers();
        int port = this.localServer.getServiceAddress().getPort();
        this.target = new HttpHost("localhost", port);

        ConnectingIOReactor ioReactor = new DefaultConnectingIOReactor(2, new BasicHttpParams());
        SchemeRegistry schemeRegistry = new SchemeRegistry();
        schemeRegistry.register(new Scheme("http", 80, null));
        this.sessionManager = new PoolingClientConnectionManager(ioReactor, schemeRegistry);
        this.httpclient = new DefaultHttpAsyncClient(ioReactor, this.sessionManager);
    }
View Full Code Here

        this.localServer.start();
        int port = this.localServer.getServiceAddress().getPort();
        this.target = new HttpHost("localhost", port, "https");

        ConnectingIOReactor ioReactor = new DefaultConnectingIOReactor(2, new BasicHttpParams());
        SchemeRegistry schemeRegistry = new SchemeRegistry();
        schemeRegistry.register(new Scheme("http", 80, null));
        schemeRegistry.register(new Scheme("https", 443, new SSLLayeringStrategy(this.clientSSLContext)));
        this.sessionManager = new PoolingClientConnectionManager(ioReactor, schemeRegistry);
        this.httpclient = new DefaultHttpAsyncClient(ioReactor, this.sessionManager);
    }
View Full Code Here

*/
@ThreadSafe
public final class SchemeRegistryFactory {

    public static SchemeRegistry createDefault() {
        SchemeRegistry registry = new SchemeRegistry();
        registry.register(
                new Scheme("http", 80, null));
        registry.register(
                new Scheme("https", 443, SSLLayeringStrategy.getDefaultStrategy()));
        return registry;
    }
View Full Code Here

TOP

Related Classes of org.apache.http.nio.conn.scheme.SchemeRegistry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.