Package org.apache.http.conn.params

Examples of org.apache.http.conn.params.ConnPerRouteBean


    public ThreadSafeClientConnManager(final HttpParams params,
                                       final SchemeRegistry schreg) {
        Args.notNull(schreg, "Scheme registry");
        this.log = LogFactory.getLog(getClass());
        this.schemeRegistry = schreg;
        this.connPerRoute = new ConnPerRouteBean();
        this.connOperator = createConnectionOperator(schreg);
        this.pool = (ConnPoolByRoute) createConnectionPool(params) ;
        this.connectionPool = this.pool;
    }
View Full Code Here


     *
     * @since 4.1
     */
    public ThreadSafeClientConnManager(final SchemeRegistry schreg,
            final long connTTL, final TimeUnit connTTLTimeUnit) {
        this(schreg, connTTL, connTTLTimeUnit, new ConnPerRouteBean());
    }
View Full Code Here

    public ThreadSafeClientConnManager(final HttpParams params,
                                       final SchemeRegistry schreg) {
        Args.notNull(schreg, "Scheme registry");
        this.log = LogFactory.getLog(getClass());
        this.schemeRegistry = schreg;
        this.connPerRoute = new ConnPerRouteBean();
        this.connOperator = createConnectionOperator(schreg);
        this.pool = (ConnPoolByRoute) createConnectionPool(params) ;
        this.connectionPool = this.pool;
    }
View Full Code Here

     *
     * @since 4.1
     */
    public ThreadSafeClientConnManager(final SchemeRegistry schreg,
            long connTTL, TimeUnit connTTLTimeUnit) {
        this(schreg, connTTL, connTTLTimeUnit, new ConnPerRouteBean());
    }
View Full Code Here

        if (schreg == null) {
            throw new IllegalArgumentException("Scheme registry may not be null");
        }
        this.log = LogFactory.getLog(getClass());
        this.schemeRegistry = schreg;
        this.connPerRoute = new ConnPerRouteBean();
        this.connOperator = createConnectionOperator(schreg);
        this.pool = (ConnPoolByRoute) createConnectionPool(params) ;
        this.connectionPool = this.pool;
    }
View Full Code Here

        }
    }

    @Test(expected=IllegalArgumentException.class)
    public void nullOperatorIsNotAllowed() {
        new ConnPoolByRoute(null, new ConnPerRouteBean(), 1, -1, TimeUnit.MILLISECONDS);
    }
View Full Code Here

    }

    static void oldPool(int c, long reps) throws Exception {
        ClientConnectionOperator operator = new DefaultClientConnectionOperator(
                SchemeRegistryFactory.createDefault());
        ConnPerRoute connPerRoute = new ConnPerRouteBean(c);
        ConnPoolByRoute pool = new ConnPoolByRoute(operator, connPerRoute, c * 10);

        WorkerThread2[] workers = new WorkerThread2[c];
        for (int i = 0; i < workers.length; i++) {
            workers[i] = new WorkerThread2(pool, reps);
View Full Code Here

        Assert.assertEquals("wrong condition", cnd, wt.getCondition());
        Assert.assertNull  ("pool from nowhere", wt.getPool());
        Assert.assertNull  ("thread from nowhere", wt.getThread());

        HttpRoute route = new HttpRoute(TARGET);
        ConnPerRoute connPerRoute = new ConnPerRouteBean(10);
        RouteSpecificPool rospl = new RouteSpecificPool(route, connPerRoute);
        wt = new WaitingThread(cnd, rospl);
        Assert.assertEquals("wrong condition", cnd, wt.getCondition());
        Assert.assertEquals("wrong pool", rospl, wt.getPool());
        Assert.assertNull  ("thread from nowhere", wt.getThread());
View Full Code Here

    @Override
    public void setUp() throws Exception {
        super.setUp();
        impl = new ConnPoolByRoute(
                new DefaultClientConnectionOperator(supportedSchemes),
                new ConnPerRouteBean(), 1, -1, TimeUnit.MILLISECONDS);
    }
View Full Code Here

    }

    private void useMockOperator() {
        reset(mockOperator);
        impl = new ConnPoolByRoute(
                mockOperator, new ConnPerRouteBean(), 1, -1, TimeUnit.MILLISECONDS);
        when(mockOperator.createConnection()).thenReturn(mockConnection);
    }
View Full Code Here

TOP

Related Classes of org.apache.http.conn.params.ConnPerRouteBean

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.