Examples of SchemeRegistry


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

        public HttpParams getParams() {
            throw new UnsupportedOperationException("just a mockup");
        }

        public SchemeRegistry getSchemeRegistry() {
            SchemeRegistry registry = new SchemeRegistry();
            registry.register(new Scheme("http", 80, new SocketFactoryMockup(null)));
            return registry;
        }
View Full Code Here

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

    public void testAbortDuringConnecting() throws Exception {
        final CountDownLatch connectLatch = new CountDownLatch(1);
        final StallingSocketFactory stallingSocketFactory = new StallingSocketFactory(
                connectLatch, WaitPolicy.BEFORE_CONNECT, PlainSocketFactory.getSocketFactory());
        Scheme scheme = new Scheme("http", 80, stallingSocketFactory);
        SchemeRegistry registry = new SchemeRegistry();
        registry.register(scheme);

        ThreadSafeClientConnManager mgr = createTSCCM(registry);
        mgr.setMaxTotal(1);

        final HttpHost target = getServerHttp();
View Full Code Here

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

    public void testAbortBeforeSocketCreate() throws Exception {
        final CountDownLatch connectLatch = new CountDownLatch(1);
        final StallingSocketFactory stallingSocketFactory = new StallingSocketFactory(
                connectLatch, WaitPolicy.BEFORE_CREATE, PlainSocketFactory.getSocketFactory());
        Scheme scheme = new Scheme("http", 80, stallingSocketFactory);
        SchemeRegistry registry = new SchemeRegistry();
        registry.register(scheme);

        ThreadSafeClientConnManager mgr = createTSCCM(registry);
        mgr.setMaxTotal(1);

        final HttpHost target = getServerHttp();
View Full Code Here

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
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.