Examples of determineRoute()


Examples of org.apache.http.conn.routing.HttpRoutePlanner.determineRoute()

        HttpHost target =
            new HttpHost("www.test.invalid", 80, "http");
        HttpRequest request =
            new BasicHttpRequest("GET", "/", HttpVersion.HTTP_1_1);

        HttpRoute route = hrp.determineRoute(target, request, null);

        assertEquals("wrong target", target, route.getTargetHost());
        assertEquals("not via proxy", 2, route.getHopCount());
        assertEquals("wrong proxy", isa1.getPort(),
                     route.getProxyHost().getPort());
View Full Code Here

Examples of org.apache.http.conn.routing.HttpRoutePlanner.determineRoute()

    private void assertHttpClientProxyHost(String expectedProxyHost) {
        HttpRoutePlanner routePlanner = HttpClientSupport.getHttpClient().getRoutePlanner();
        HttpRoute httpRoute = null;
        try {
            httpRoute = routePlanner.determineRoute(new HttpHost("soapui.org"), httpMethod, null);
        } catch (HttpException e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
        if (expectedProxyHost == null) {
View Full Code Here

Examples of org.apache.http.conn.routing.HttpRoutePlanner.determineRoute()

        try {
            if (connectionBackoffStrategy != null && backoffManager != null) {
                final HttpHost targetForRoute = (target != null) ? target
                        : (HttpHost) determineParams(request).getParameter(
                                ClientPNames.DEFAULT_HOST);
                final HttpRoute route = routePlanner.determineRoute(targetForRoute, request, execContext);

                final CloseableHttpResponse out;
                try {
                    out = CloseableHttpResponseProxy.newProxy(
                            director.execute(target, request, execContext));
View Full Code Here

Examples of org.apache.http.conn.routing.HttpRoutePlanner.determineRoute()

        HttpHost target =
            new HttpHost("www.test.invalid", 80, "http");
        HttpRequest request =
            new BasicHttpRequest("GET", "/", HttpVersion.HTTP_1_1);

        HttpRoute route = hrp.determineRoute(target, request, null);

        assertEquals("wrong target", target, route.getTargetHost());
        assertEquals("not direct", 1, route.getHopCount());
    }
View Full Code Here

Examples of org.apache.http.conn.routing.HttpRoutePlanner.determineRoute()

        HttpHost target =
            new HttpHost("www.test.invalid", 80, "http");
        HttpRequest request =
            new BasicHttpRequest("GET", "/", HttpVersion.HTTP_1_1);

        HttpRoute route = hrp.determineRoute(target, request, null);

        assertEquals("wrong target", target, route.getTargetHost());
        assertEquals("not via proxy", 2, route.getHopCount());
        assertEquals("wrong proxy", isa1.getPort(),
                     route.getProxyHost().getPort());
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.