Package org.apache.http.nio.conn

Examples of org.apache.http.nio.conn.SchemeIOSessionFactory


        if (route.getProxyHost() != null) {
            host = route.getProxyHost();
        } else {
            host = route.getTargetHost();
        }
        final SchemeIOSessionFactory sf = this.iosessionFactoryRegistry.lookup(
                host.getSchemeName());
        if (sf == null) {
            future.failed(new IOException("Unsupported scheme: " + host.getSchemeName()));
            return future;
        }
View Full Code Here


        if (route.getProxyHost() != null) {
            host = route.getProxyHost();
        } else {
            host = route.getTargetHost();
        }
        final SchemeIOSessionFactory sf = this.iosessionFactoryRegistry.lookup(
                host.getSchemeName());
        if (sf == null) {
            throw new IOException("Unsupported scheme: " + host.getSchemeName());
        }
        synchronized (managedConn) {
            final CPoolEntry entry = CPoolProxy.getPoolEntry(managedConn);
            final ManagedNHttpClientConnection conn = entry.getConnection();
            final IOSession currentSession = sf.create(host, conn.getIOSession());
            conn.bind(currentSession);
        }
    }
View Full Code Here

            final HttpRoute route,
            final HttpContext context) throws IOException {
        Args.notNull(managedConn, "Managed connection");
        Args.notNull(route, "HTTP route");
        final HttpHost host  = route.getTargetHost();
        final SchemeIOSessionFactory sf = this.iosessionFactoryRegistry.lookup(
            host.getSchemeName());
        if (sf == null) {
            throw new IOException("Unsupported scheme: " + host.getSchemeName());
        }
        synchronized (managedConn) {
            final CPoolEntry entry = CPoolProxy.getPoolEntry(managedConn);
            final ManagedNHttpClientConnection conn = entry.getConnection();
            Asserts.check(sf.isLayering(), "Layering is not supported for this scheme");
            final IOSession currentSession = sf.create(host, conn.getIOSession());
            conn.bind(currentSession);
        }
    }
View Full Code Here

    }

    public CloseableHttpAsyncClient build() {
        NHttpClientConnectionManager connManager = this.connManager;
        if (connManager == null) {
            SchemeIOSessionFactory iosessionFactory = this.iosessionFactory;
            if (iosessionFactory == null) {
                SSLContext sslcontext = this.sslcontext;
                if (sslcontext == null) {
                    if (systemProperties) {
                        sslcontext = SSLContexts.createDefault();
View Full Code Here

TOP

Related Classes of org.apache.http.nio.conn.SchemeIOSessionFactory

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.