Examples of UriHttpRequestHandlerMapper


Examples of org.apache.http.protocol.UriHttpRequestHandlerMapper

     * still aborts in the correct place (while trying to get the new
     * host's route, not while doing the subsequent request).
     */
    @Test
    public void testAbortAfterRedirectedRoute() throws Exception {
        final UriHttpRequestHandlerMapper reqistry = new UriHttpRequestHandlerMapper();
        this.serverBootstrap.setHandlerMapper(reqistry);

        final CountDownLatch connLatch = new CountDownLatch(1);
        final CountDownLatch awaitLatch = new CountDownLatch(1);
        final ConnMan4 conMan = new ConnMan4(connLatch, awaitLatch);
        final AtomicReference<Throwable> throwableRef = new AtomicReference<Throwable>();
        final CountDownLatch getLatch = new CountDownLatch(1);
        this.clientBuilder.setConnectionManager(conMan);
        final HttpContext context = new BasicHttpContext();
        final HttpGet httpget = new HttpGet("a");

        final HttpHost target = start();
        reqistry.register("*", new BasicRedirectService(target.getPort()));

        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
View Full Code Here

Examples of org.apache.http.protocol.UriHttpRequestHandlerMapper

                        new ResponseDate(),
                        new ResponseServer("TEST-SERVER/1.1"),
                        new ResponseContent(),
                        new ResponseConnControl()
                });
        this.reqistry = new UriHttpRequestHandlerMapper();
        this.serversocket = new ServerSocket(0);
    }
View Full Code Here

Examples of org.apache.http.protocol.UriHttpRequestHandlerMapper

            // Set up outgoing request executor
            HttpRequestExecutor httpexecutor = new HttpRequestExecutor();

            // Set up incoming request handler
            UriHttpRequestHandlerMapper reqistry = new UriHttpRequestHandlerMapper();
            reqistry.register("*", new ProxyHandler(
                    this.target,
                    outhttpproc,
                    httpexecutor));

            // Set up the HTTP service
View Full Code Here

Examples of org.apache.http.protocol.UriHttpRequestHandlerMapper

                        new ResponseContent(),
                        new ResponseConnControl()
                });
        this.connStrategy = DefaultConnectionReuseStrategy.INSTANCE;
        this.responseFactory = DefaultHttpResponseFactory.INSTANCE;
        this.reqistry = new UriHttpRequestHandlerMapper();
        this.serversocket = new ServerSocket(0);
    }
View Full Code Here

Examples of org.apache.http.protocol.UriHttpRequestHandlerMapper

                .add(new ResponseServer("Test/1.1"))
                .add(new ResponseContent())
                .add(new ResponseConnControl()).build();

        // Set up request handlers
        UriHttpRequestHandlerMapper reqistry = new UriHttpRequestHandlerMapper();
        reqistry.register("*", new HttpFileHandler(docRoot));

        // Set up the HTTP service
        HttpService httpService = new HttpService(httpproc, reqistry);

        SSLServerSocketFactory sf = null;
View Full Code Here

Examples of org.apache.http.protocol.UriHttpRequestHandlerMapper

            // Set up outgoing request executor
            final HttpRequestExecutor httpexecutor = new HttpRequestExecutor();

            // Set up incoming request handler
            final UriHttpRequestHandlerMapper reqistry = new UriHttpRequestHandlerMapper();
            reqistry.register("*", new ProxyHandler(
                    this.target,
                    outhttpproc,
                    httpexecutor));

            // Set up the HTTP service
View Full Code Here

Examples of org.apache.http.protocol.UriHttpRequestHandlerMapper

                        new ResponseContent(),
                        new ResponseConnControl()
                });
        this.connStrategy = DefaultConnectionReuseStrategy.INSTANCE;
        this.responseFactory = DefaultHttpResponseFactory.INSTANCE;
        this.reqistry = new UriHttpRequestHandlerMapper();
        this.serversocket = new ServerSocket(0);
    }
View Full Code Here

Examples of org.apache.http.protocol.UriHttpRequestHandlerMapper

            // Set up outgoing request executor
            final HttpRequestExecutor httpexecutor = new HttpRequestExecutor();

            // Set up incoming request handler
            final UriHttpRequestHandlerMapper reqistry = new UriHttpRequestHandlerMapper();
            reqistry.register("*", new ProxyHandler(
                    this.target,
                    outhttpproc,
                    httpexecutor));

            // Set up the HTTP service
View Full Code Here

Examples of org.apache.http.protocol.UriHttpRequestHandlerMapper

                        new ResponseDate(),
                        new ResponseServer("TEST-SERVER/1.1"),
                        new ResponseContent(),
                        new ResponseConnControl()
                });
        this.reqistry = new UriHttpRequestHandlerMapper();
        this.serversocket = new ServerSocket(0);
    }
View Full Code Here

Examples of org.apache.http.protocol.UriHttpRequestHandlerMapper

            final ConnectionReuseStrategy reuseStrat,
            final HttpResponseFactory responseFactory,
            final HttpExpectationVerifier expectationVerifier,
            final SSLContext sslcontext) {
        super();
        this.handlerRegistry = new UriHttpRequestHandlerMapper();
        this.workers = Collections.synchronizedSet(new HashSet<Worker>());
        this.httpservice = new HttpService(
            proc != null ? proc : newProcessor(),
            reuseStrat != null ? reuseStrat: newConnectionReuseStrategy(),
            responseFactory != null ? responseFactory: newHttpResponseFactory(),
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.