Package org.xlightweb

Examples of org.xlightweb.HttpResponse


  @Mapping("/Person/*")
  private static final class PersonRequestHandler implements IHttpRequestHandler {
     
      public void onRequest(IHttpExchange exchange) throws IOException, BadMessageException {
          exchange.send(new HttpResponse(200, "text/plain", "person"));
      }     
View Full Code Here


 
    @Mapping("/Account/*")
    private static final class AccountRequestHandler implements IHttpRequestHandler {
       
        public void onRequest(IHttpExchange exchange) throws IOException, BadMessageException {
            exchange.send(new HttpResponse(200, "text/plain", "account"));
        }      
View Full Code Here

 
 
  private static final class ServerErrorRequestHandler implements IHttpRequestHandler {
   
    public void onRequest(IHttpExchange exchange) throws IOException, BadMessageException {
      exchange.send(new HttpResponse(500));
    }
View Full Code Here

 

  private static final class GoodRequestHandler implements IHttpRequestHandler {
   
    public void onRequest(IHttpExchange exchange) throws IOException, BadMessageException {
      exchange.send(new HttpResponse(200));
    }
View Full Code Here

 
 
  private static final class BadRequestHandler implements IHttpRequestHandler {
   
    public void onRequest(IHttpExchange exchange) throws IOException, BadMessageException {
      exchange.send(new HttpResponse(400));
    }
View Full Code Here

        String value = request.getParameter(key);
        sb.append("[param] " + key  + "=" + value + "\r\n");
      }


      exchange.send(new HttpResponse(200, "text/plain", sb.toString()));
    }
View Full Code Here

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

   
    @Execution(Execution.NONTHREADED)
    public void onRequest(IHttpExchange exchange) throws IOException {
      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 {
      onRequestThreadname = Thread.currentThread().getName();

      exchange.send(new HttpResponse(200, "text/plain", "OK"));
    }
View Full Code Here

 
  private static final class DoNothingHandler implements IHttpRequestHandler {
   
    public void onRequest(IHttpExchange exchange) throws IOException {

      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.