Package org.apache.http.conn.routing

Examples of org.apache.http.conn.routing.HttpRoute


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

        final HttpHost target = getServerHttp();
        final HttpRoute route = new HttpRoute(target, null, false);
        final int      rsplen = 8;
        final String      uri = "/random/" + rsplen;

        HttpRequest request =
            new BasicHttpRequest("GET", uri, HttpVersion.HTTP_1_1);
View Full Code Here


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

        final HttpHost target = getServerHttp();
        final HttpRoute route = new HttpRoute(target, null, false);
        final int      rsplen = 8;
        final String      uri = "/random/" + rsplen;

        HttpRequest request =
            new BasicHttpRequest("GET", uri, HttpVersion.HTTP_1_1);
View Full Code Here

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

        final HttpHost target = getServerHttp();
        final HttpRoute route = new HttpRoute(target, null, false);

        ManagedClientConnection conn = getConnection(mgr, route);
        conn.open(route, httpContext, defaultParams);

        Assert.assertEquals("connectionsInPool", 1, mgr.getConnectionsInPool());
View Full Code Here

        ThreadSafeClientConnManager mgr = createTSCCM(null, 100, TimeUnit.MILLISECONDS);
        mgr.setMaxTotal(1);

        final HttpHost target = getServerHttp();
        final HttpRoute route = new HttpRoute(target, null, false);

        ManagedClientConnection conn = getConnection(mgr, route);
        conn.open(route, httpContext, defaultParams);

        Assert.assertEquals("connectionsInPool", 1, mgr.getConnectionsInPool());
View Full Code Here

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

        final HttpHost target = getServerHttp();
        final HttpRoute route = new HttpRoute(target, null, false);
        final int      rsplen = 8;
        final String      uri = "/random/" + rsplen;

        HttpRequest request =
            new BasicHttpRequest("GET", uri, HttpVersion.HTTP_1_1);
View Full Code Here

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

        final HttpHost target = getServerHttp();
        final HttpRoute route = new HttpRoute(target, null, false);

        final ManagedClientConnection conn = getConnection(mgr, route);
        Assert.assertTrue(conn instanceof AbstractClientConnAdapter);

        final AtomicReference<Throwable> throwRef = new AtomicReference<Throwable>();
View Full Code Here

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

        final HttpHost target = getServerHttp();
        final HttpRoute route = new HttpRoute(target, null, false);

        final ManagedClientConnection conn = getConnection(mgr, route);
        Assert.assertTrue(conn instanceof AbstractClientConnAdapter);

        final AtomicReference<Throwable> throwRef = new AtomicReference<Throwable>();
View Full Code Here

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

        final HttpHost target = getServerHttp();
        final HttpRoute route = new HttpRoute(target, null, false);

        final ManagedClientConnection conn = getConnection(mgr, route);
        Assert.assertTrue(conn instanceof AbstractClientConnAdapter);

        final AtomicReference<Throwable> throwRef = new AtomicReference<Throwable>();
View Full Code Here

        };
        mgr.setMaxTotal(1);
        Assert.assertNotNull(operatorRef.get());

        final HttpHost target = getServerHttp();
        final HttpRoute route = new HttpRoute(target, null, false);

        final ManagedClientConnection conn = getConnection(mgr, route);
        Assert.assertTrue(conn instanceof AbstractClientConnAdapter);

        final AtomicReference<Throwable> throwRef = new AtomicReference<Throwable>();
View Full Code Here

     */
    protected void testUnsafeMethodDoesNotInvalidateCacheForHeaderUri(
            final HttpRequestWrapper unsafeReq) throws Exception, IOException {

        final HttpHost otherHost = new HttpHost("bar.example.com");
        final HttpRoute otherRoute = new HttpRoute(otherHost);
        final HttpRequestWrapper req1 = HttpRequestWrapper.wrap(
                new BasicHttpRequest("GET", "/content", HttpVersion.HTTP_1_1));
        final HttpResponse resp1 = HttpTestUtils.make200Response();
        resp1.setHeader("Cache-Control","public, max-age=3600");

View Full Code Here

TOP

Related Classes of org.apache.http.conn.routing.HttpRoute

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.