Package org.xlightweb

Examples of org.xlightweb.HttpResponse


    @InvokeOn(InvokeOn.MESSAGE_RECEIVED)
    public void onRequest(IHttpExchange exchange) throws IOException {
      httpRequest = exchange.getRequest();
      onRequestThreadname = Thread.currentThread().getName();
     
      exchange.send(new HttpResponse(200, "text/plain", "OK"));
    }
View Full Code Here


    @InvokeOn(InvokeOn.MESSAGE_RECEIVED)
    public void onRequest(IHttpExchange exchange) throws IOException {
      httpRequest = exchange.getRequest();
      onRequestThreadname = Thread.currentThread().getName();
     
      exchange.send(new HttpResponse(200, "text/plain", "OK"));
    }
View Full Code Here

 
 
  private static final class MyBusinessHandler implements IHttpRequestHandler {
   
    public void onRequest(IHttpExchange exchange) throws IOException, BadMessageException {
      exchange.send(new HttpResponse(200, "text/plain", "[12, 23, 456, 67]"));
    }
View Full Code Here

 
 
  @Mapping("/rpc/*")
  public static final class AnnotatedHandler implements IHttpRequestHandler {
    public void onRequest(IHttpExchange exchange) throws IOException, BadMessageException {
      exchange.send(new HttpResponse(200, "text/plain", "[12, 23, 456, 67]"));
    }
View Full Code Here

     
      StringBuilder sb = new StringBuilder();
      sb.append("contextPath=" + ctxPath + "\r\n");
      sb.append("servletPath=" + srvPath + "\r\n");
     
      exchange.send(new HttpResponse(sb.toString()));
    }
View Full Code Here

        IHttpRequestHandler hdl = new IHttpRequestHandler() {
           
            @Supports100Continue
            public void onRequest(IHttpExchange exchange) throws IOException {
               
                exchange.send(new HttpResponse(100))// send continue
               
                exchange.send(new HttpResponse(200, "text/plain", "OK"));
            }
        };

        HttpServer server = new HttpServer(hdl);
        server.start();
View Full Code Here

            @Supports100Continue
            public void onRequest(IHttpExchange exchange) throws IOException {
                exchange.sendContinue();
                exchange.sendContinue();
               
                exchange.send(new HttpResponse(200, "text/plain", "OK"));
            }
        };
       
       
        HttpServer server = new HttpServer(hdl);
View Full Code Here

   
    public void onRequest(IHttpExchange exchange) throws IOException {
      countOnRequestCalled++;
      onRequestThreadname = Thread.currentThread().getName();
     
      exchange.send(new HttpResponse(200, "text/plain", "OK"));
    }
View Full Code Here

   
    public void onRequest(IHttpExchange exchange) throws IOException {
      countOnRequestCalled++;
      onRequestThreadname.set(Thread.currentThread().getName());
     
      exchange.send(new HttpResponse(200, "text/plain", "OK"));
    }
View Full Code Here

   
    public void onRequest(IHttpExchange exchange) throws IOException {
      countOnRequestCalled++;
      onRequestThreadname = Thread.currentThread().getName();
     
      exchange.send(new HttpResponse(200, "text/plain", "OK"));
    }
View Full Code Here

TOP

Related Classes of org.xlightweb.HttpResponse

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.