Examples of LayeringStrategy


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

            throw new IllegalStateException("Target host may be null");
        }
        InetAddress local = ConnRouteParams.getLocalAddress(request.getParams());
        HttpHost proxy = ConnRouteParams.getDefaultProxy(request.getParams());
        Scheme scheme = this.schemeRegistry.getScheme(target);
        LayeringStrategy layeringStrategy = scheme.getLayeringStrategy();
        boolean secure = layeringStrategy != null && layeringStrategy.isSecure();
        if (proxy == null) {
            route = new HttpRoute(target, local, secure);
        } else {
            route = new HttpRoute(target, local, proxy, secure);
        }
View Full Code Here

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

        final HttpHost proxy = route.getProxyHost();
        IOSession iosession = entry.getConnection();

        if (proxy == null) {
            final AsyncScheme scheme = getSchemeRegistry(context).getScheme(target);
            final LayeringStrategy layeringStrategy = scheme.getLayeringStrategy();
            if (layeringStrategy != null) {
                iosession = layeringStrategy.layer(iosession);
            }
        }

        final ClientAsyncConnection conn = this.connFactory.create(
                "http-outgoing-" + entry.getId(),
View Full Code Here

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

        if (tracker.isLayered()) {
            throw new IllegalStateException("Multiple protocol layering not supported");
        }
        final HttpHost target = tracker.getTargetHost();
        final AsyncScheme scheme = getSchemeRegistry(context).getScheme(target);
        final LayeringStrategy layeringStrategy = scheme.getLayeringStrategy();
        if (layeringStrategy == null) {
            throw new IllegalStateException(scheme.getName() +
                    " scheme does not provider support for protocol layering");
        }
        final IOSession iosession = entry.getConnection();
        final ClientAsyncConnection conn = (ClientAsyncConnection) iosession.getAttribute(
                IOEventDispatch.CONNECTION_KEY);
        conn.upgrade((SSLIOSession) layeringStrategy.layer(iosession));
        tracker.layerProtocol(layeringStrategy.isSecure());
    }
View Full Code Here

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

            final AsyncSchemeRegistry registry = getSchemeRegistry(context);
            scheme = registry.getScheme(target);
        } catch (final IllegalStateException ex) {
            throw new HttpException(ex.getMessage());
        }
        final LayeringStrategy layeringStrategy = scheme.getLayeringStrategy();
        final boolean secure = layeringStrategy != null && layeringStrategy.isSecure();
        if (proxy == null) {
            route = new HttpRoute(target, local, secure);
        } else {
            route = new HttpRoute(target, local, proxy, secure);
        }
View Full Code Here

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

        HttpHost proxy = route.getProxyHost();
        IOSession iosession = entry.getConnection();

        if (proxy == null) {
            AsyncScheme scheme = this.manager.getSchemeRegistry().getScheme(target);
            LayeringStrategy layeringStrategy = scheme.getLayeringStrategy();
            if (layeringStrategy != null) {
                iosession = layeringStrategy.layer(iosession);
            }
        }

        ClientAsyncConnection conn = this.connFactory.create(
                "http-outgoing-" + entry.getId(),
View Full Code Here

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

        if (tracker.isLayered()) {
            throw new IllegalStateException("Multiple protocol layering not supported");
        }
        HttpHost target = tracker.getTargetHost();
        AsyncScheme scheme = this.manager.getSchemeRegistry().getScheme(target);
        LayeringStrategy layeringStrategy = scheme.getLayeringStrategy();
        if (layeringStrategy == null) {
            throw new IllegalStateException(scheme.getName() +
                    " scheme does not provider support for protocol layering");
        }
        IOSession iosession = entry.getConnection();
        ClientAsyncConnection conn = (ClientAsyncConnection) iosession.getAttribute(
                IOEventDispatch.CONNECTION_KEY);
        conn.upgrade((SSLIOSession) layeringStrategy.layer(iosession));
        tracker.layerProtocol(layeringStrategy.isSecure());
    }
View Full Code Here

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

        try {
            scheme = this.schemeRegistry.getScheme(target);
        } catch (IllegalStateException ex) {
            throw new HttpException(ex.getMessage());
        }
        LayeringStrategy layeringStrategy = scheme.getLayeringStrategy();
        boolean secure = layeringStrategy != null && layeringStrategy.isSecure();
        if (proxy == null) {
            route = new HttpRoute(target, local, secure);
        } else {
            route = new HttpRoute(target, local, proxy, secure);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.