Examples of RoutedRequest


Examples of org.apache.http.impl.client.RoutedRequest

            final HttpRoute newRoute = determineRoute(newTarget, newRequest, this.localContext);

            if (this.log.isDebugEnabled()) {
                this.log.debug("[exchange: " + this.id + "] Redirecting to '" + uri + "' via " + newRoute);
            }
            return new RoutedRequest(newRequest, newRoute);
        }
        return null;
    }
View Full Code Here

Examples of org.apache.http.impl.client.RoutedRequest

            HttpRequest request = this.requestProducer.generateRequest();
            this.params = new ClientParamsStack(null, this.clientParams, request.getParams(), null);
            RequestWrapper wrapper = wrapRequest(request);
            wrapper.setParams(this.params);
            HttpRoute route = determineRoute(target, wrapper, this.localContext);
            this.mainRequest = new RoutedRequest(wrapper, route);
            this.requestContentProduced = false;
            requestConnection();
        } catch (Exception ex) {
            failed(ex);
        }
View Full Code Here

Examples of org.apache.http.impl.client.RoutedRequest

        HttpRequest req = new BasicHttpRequest("CONNECT", buffer.toString(), ver);
        return req;
    }

    private RoutedRequest handleResponse() throws HttpException {
        RoutedRequest followup = null;
        if (HttpClientParams.isRedirecting(this.params)) {
            followup = handleRedirect();
            if (followup != null) {
                return followup;
            }
View Full Code Here

Examples of org.apache.http.impl.client.RoutedRequest

        }
        return null;
    }

    private RoutedRequest handleConnectResponse() throws HttpException {
        RoutedRequest followup = null;
        if (HttpClientParams.isAuthenticating(this.params)) {
            CredentialsProvider credsProvider = (CredentialsProvider) this.localContext.getAttribute(
                    ClientContext.CREDS_PROVIDER);
            if (credsProvider != null) {
                followup = handleProxyChallenge(credsProvider);
View Full Code Here

Examples of org.apache.http.impl.client.RoutedRequest

            HttpRoute newRoute = determineRoute(newTarget, newRequest, this.localContext);

            if (this.log.isDebugEnabled()) {
                this.log.debug("Redirecting to '" + uri + "' via " + newRoute);
            }
            return new RoutedRequest(newRequest, newRoute);
        }
        return null;
    }
View Full Code Here

Examples of org.mojavemvc.core.RoutedRequest

    }
   
    @Test
    public void handlesNullPath() {
       
        RoutedRequest routed = newRouter(null).route();
       
        assertNull(routed.getController());
        assertNull(routed.getAction());
        assertTrue(routed.getParameterMap().isEmpty());
    }
View Full Code Here

Examples of org.mojavemvc.core.RoutedRequest

    }
   
    @Test
    public void handlesEmptyPath() {
       
        RoutedRequest routed = newRouter("").route();
       
        assertNull(routed.getController());
        assertNull(routed.getAction());
        assertTrue(routed.getParameterMap().isEmpty());
    }
View Full Code Here

Examples of org.mojavemvc.core.RoutedRequest

       
        String pathInfo = "/";
        when(router.route(pathInfo))
            .thenReturn(new MojaveRoute(null, null, null));
       
        RoutedRequest routed = newRouter(pathInfo).route();
       
        assertNull(routed.getController());
        assertNull(routed.getAction());
        assertTrue(routed.getParameterMap().isEmpty());
    }
View Full Code Here

Examples of org.mojavemvc.core.RoutedRequest

        String pathInfo = "/cntrl";
        when(router.route(pathInfo))
            .thenReturn(new MojaveRoute("cntrl", null, null));
       
       
        RoutedRequest routed = newRouter(pathInfo).route();
       
        assertEquals("cntrl", routed.getController());
        assertNull(routed.getAction());
        assertTrue(routed.getParameterMap().isEmpty());
    }
View Full Code Here

Examples of org.mojavemvc.core.RoutedRequest

       
        String pathInfo = "/cntrl/actn";
        when(router.route(pathInfo))
            .thenReturn(new MojaveRoute("cntrl", "actn", null));
       
        RoutedRequest routed = newRouter(pathInfo).route();
       
        assertEquals("cntrl", routed.getController());
        assertEquals("actn", routed.getAction());
        assertTrue(routed.getParameterMap().isEmpty());
    }
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.