Examples of Scheme


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

        HttpParams mgrpar = defaultParams.copy();
        ConnManagerParams.setMaxTotalConnections(mgrpar, 1);
       
        final CountDownLatch connectLatch = new CountDownLatch(1);       
        final StallingSocketFactory stallingSocketFactory = new StallingSocketFactory(connectLatch, WaitPolicy.AFTER_CONNECT, PlainSocketFactory.getSocketFactory());
        Scheme scheme = new Scheme("http", stallingSocketFactory, 80);
        SchemeRegistry registry = new SchemeRegistry();
        registry.register(scheme);

        ThreadSafeClientConnManager mgr = createTSCCM(mgrpar, registry);
View Full Code Here

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

     */
    public SchemeRegistry createSchemeRegistry() {

        SchemeRegistry schreg = new SchemeRegistry();
        SocketFactory sf = PlainSocketFactory.getSocketFactory();
        schreg.register(new Scheme("http", sf, 80));

        return schreg;
    }
View Full Code Here

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

        }

        if (supportedSchemes == null) {
            supportedSchemes = new SchemeRegistry();
            SocketFactory sf = PlainSocketFactory.getSocketFactory();
            supportedSchemes.register(new Scheme("http", sf, 80));
        }

        if (httpProcessor == null) {
            httpProcessor = new BasicHttpProcessor();
            httpProcessor.addInterceptor(new RequestContent());
View Full Code Here

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

     */
    protected DefaultHttpClientConnection connectTo(HttpHost target,
                                                    HttpParams params)
        throws Exception {

        Scheme schm = supportedSchemes.get(target.getSchemeName());
        int port = schm.resolvePort(target.getPort());

        DefaultHttpClientConnection conn = new DefaultHttpClientConnection();
        Socket sock = schm.getSocketFactory().connectSocket
            (null, target.getHostName(), port, null, 0, params);
        conn.bind(sock, params);

        return conn;
    }
View Full Code Here

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

     */
    public SchemeRegistry createSchemeRegistry() {

        SchemeRegistry schreg = new SchemeRegistry();
        SocketFactory sf = PlainSocketFactory.getSocketFactory();
        schreg.register(new Scheme("http", sf, 80));

        return schreg;
    }
View Full Code Here

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

            throw new UnsupportedOperationException("just a mockup");
        }

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

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

        ConnManagerParams.setMaxConnectionsPerRoute(params,
                new ConnPerRouteBean(5));
       
        SchemeRegistry supportedSchemes = new SchemeRegistry();
        SocketFactory sf = PlainSocketFactory.getSocketFactory();
        supportedSchemes.register(new Scheme("http", sf, 80));
       
        ThreadSafeClientConnManager mgr = new ThreadSafeClientConnManager(
                params, supportedSchemes);

        DefaultHttpClient client = new DefaultHttpClient(mgr, params);
View Full Code Here

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

        ConnManagerParams.setMaxConnectionsPerRoute(params,
                new ConnPerRouteBean(5));
       
        SchemeRegistry supportedSchemes = new SchemeRegistry();
        SocketFactory sf = PlainSocketFactory.getSocketFactory();
        supportedSchemes.register(new Scheme("http", sf, 80));
       
        ThreadSafeClientConnManager mgr = new ThreadSafeClientConnManager(
                params, supportedSchemes);

        DefaultHttpClient client = new DefaultHttpClient(mgr, params);
View Full Code Here

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

        ConnManagerParams.setMaxConnectionsPerRoute(params,
                new ConnPerRouteBean(5));
       
        SchemeRegistry supportedSchemes = new SchemeRegistry();
        SocketFactory sf = PlainSocketFactory.getSocketFactory();
        supportedSchemes.register(new Scheme("http", sf, 80));
       
        ThreadSafeClientConnManager mgr = new ThreadSafeClientConnManager(
                params, supportedSchemes);

        DefaultHttpClient client = new DefaultHttpClient(mgr, params);
View Full Code Here

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

        ConnManagerParams.setMaxConnectionsPerRoute(params,
                new ConnPerRouteBean(1));
       
        SchemeRegistry supportedSchemes = new SchemeRegistry();
        SocketFactory sf = PlainSocketFactory.getSocketFactory();
        supportedSchemes.register(new Scheme("http", sf, 80));
       
        ThreadSafeClientConnManager mgr = new ThreadSafeClientConnManager(
                params, supportedSchemes);

        DefaultHttpClient client = new DefaultHttpClient(mgr, params);
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.