Examples of HttpRequestHandler


Examples of co.cask.cdap.gateway.router.handlers.HttpRequestHandler

            pipeline.addLast("access-token-authenticator", new SecurityAuthenticationHttpHandler(
              realm, tokenValidator, configuration, accessTokenTransformer, discoveryServiceClient));
          }
          // for now there's only one hardcoded rule, but if there will be more, we may want it generic and configurable
          pipeline.addLast("http-request-handler",
                           new HttpRequestHandler(clientBootstrap, serviceLookup,
                                                  ImmutableList.<ProxyRule>of(new DatasetsProxyRule(configuration))));
          return pipeline;
        }
      }
    );
View Full Code Here

Examples of com.google.opengse.HttpRequestHandler

   */
  ServletEngineImpl(FilterChain dispatcher, ServletEngineConfiguration config)
      throws IOException, InterruptedException {
    NetSelector selector = new NetSelector();
    DispatchQueue queue = new DispatchQueueImpl(config.getMaxThreads());
    HttpRequestHandler handler = new HttpRequestHandlerAdapter(dispatcher);
    server_ = new HttpServer(selector, queue, handler, config);
    server_.getSelector().listen(config.getPort(), server_, false);
  }
View Full Code Here

Examples of com.linkedin.databus2.core.container.netty.HttpRequestHandler

            new ExtendedReadTimeoutHandler("server container " + _serverContainer.getContainerStaticConfig().getId(),
                                           _serverContainer.getNetworkTimeoutTimer(),
                                           _serverContainer.getContainerStaticConfig().getReadTimeoutMs(),
                                           true);

        HttpRequestHandler reqHandler = new HttpRequestHandler(_serverContainer, readTimeoutHandler);
        pipeline.addLast("handler", reqHandler);

        if (_serverContainer.getContainerStaticConfig().getEnableHttpCompression())
        {
          pipeline.addLast("deflater", new HttpContentCompressor());
View Full Code Here

Examples of com.nhncorp.mods.socket.io.impl.handlers.HttpRequestHandler

    this.rooms = vertx.sharedData().getMap("rooms");
    this.roomClients = vertx.sharedData().getMap("roomClients");
    this.sockets = this.of(DEFAULT_NSP);

    this.handshakeHandler = new HandshakeHandler(this);
    this.httpRequestHandler = new HttpRequestHandler(this);
    this.staticHandler = new StaticHandler(this);

    this.log.info("socket.io started");
  }
View Full Code Here

Examples of org.apache.commons.httpclient.server.HttpRequestHandler

        assertTrue(connectionManager.getConection().isOpen());
    }
   
    public void testNoContentLength() throws Exception {
        // test with connection header
        this.server.setRequestHandler(new HttpRequestHandler() {
            public boolean processRequest(SimpleHttpServerConnection conn,
                    SimpleRequest request) throws IOException {
                ResponseWriter out = conn.getWriter();
                out.println("HTTP/1.1 200 OK");
                out.println("Connection: keep-alive");
                out.println();
                out.println("12345");
                out.flush();
                return true;
            }
        });

        GetMethod method = new GetMethod("/");
        client.executeMethod(method);
        method.getResponseBodyAsString();
       
        assertFalse(connectionManager.getConection().isOpen());
       
        // test without connection header
        this.server.setRequestHandler(new HttpRequestHandler() {
            public boolean processRequest(SimpleHttpServerConnection conn,
                    SimpleRequest request) throws IOException {
                ResponseWriter out = conn.getWriter();
                out.println("HTTP/1.1 200 OK");
                out.println();
View Full Code Here

Examples of org.apache.commons.httpclient.server.HttpRequestHandler

        assertEquals(5, method.getResponseContentLength());
    }

    public void testProxyNoContentLength() throws Exception {
        // test with proxy-connection header
        this.server.setRequestHandler(new HttpRequestHandler() {
            public boolean processRequest(SimpleHttpServerConnection conn,
                    SimpleRequest request) throws IOException {
                ResponseWriter out = conn.getWriter();
                out.println("HTTP/1.1 200 OK");
                out.println("proxy-connection: keep-alive");
                out.println();
                out.println("12345");
                out.flush();
                return true;
            }
        });

        client.getHostConfiguration().setProxy(server.getLocalAddress(), server.getLocalPort());
        GetMethod method = new GetMethod("/");
        client.executeMethod(method);
        method.getResponseBodyAsString();
       
        assertFalse(connectionManager.getConection().isOpen());

        // test without proxy-connection header
        this.server.setRequestHandler(new HttpRequestHandler() {
            public boolean processRequest(SimpleHttpServerConnection conn,
                    SimpleRequest request) throws IOException {
                ResponseWriter out = conn.getWriter();
                out.println("HTTP/1.1 200 OK");
                out.println();
View Full Code Here

Examples of org.apache.commons.httpclient.server.HttpRequestHandler

        assertEquals(null, method.getResponseHeader("bogus"));
    }
   
    public void testFoldedHeaders() throws Exception {
        final String body = "XXX\r\nYYY\r\nZZZ";
        this.server.setRequestHandler(new HttpRequestHandler() {
            public boolean processRequest(SimpleHttpServerConnection conn,
                    SimpleRequest request) throws IOException {
                ResponseWriter out = conn.getWriter();
                out.println("HTTP/1.1 200 OK");
                out.println("Connection: close");
View Full Code Here

Examples of org.apache.commons.httpclient.server.HttpRequestHandler

        assertTrue(method.getResponseHeader("Content-Type").toString().indexOf("boundary") != -1);
    }


    public void testForceCloseConnection() throws Exception {
        this.server.setRequestHandler(new HttpRequestHandler() {
            public boolean processRequest(SimpleHttpServerConnection conn,
                    SimpleRequest request) throws IOException {
                ResponseWriter out = conn.getWriter();
                out.println("HTTP/1.1 200 OK");
                out.println("Content-Type: garbage");
View Full Code Here

Examples of org.apache.commons.httpclient.server.HttpRequestHandler

                method.shouldCloseConnection(connectionManager.getConection()));
        assertTrue("Connection should be force-closed", method.isConnectionCloseForced());
    }
   
    public void testForceCloseConnection2() throws Exception {
        this.server.setRequestHandler(new HttpRequestHandler() {
            public boolean processRequest(SimpleHttpServerConnection conn,
                    SimpleRequest request) throws IOException {
                ResponseWriter out = conn.getWriter();
                out.println("HTTP/1.1 200 OK");
                out.println("Content-Type: garbage");
View Full Code Here

Examples of org.apache.commons.httpclient.server.HttpRequestHandler

        }
        assertTrue(connman.getConection().isOpen());
    }

    public void testRequestConnClose() throws Exception {
        this.server.setRequestHandler(new HttpRequestHandler() {
          
            public boolean processRequest(
                    final SimpleHttpServerConnection conn,
                    final SimpleRequest request) throws IOException {
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.