Package org.xlightweb

Examples of org.xlightweb.IHttpRequestHandler


 

    @Test
    public void testServerSide() throws Exception {
   
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {
           
            public void onRequest(IHttpExchange exchange) throws IOException {
                exchange.send(new HttpResponse(200, "text/plain", "1234567890"));
            }           
        };  
View Full Code Here


   
   
    @Test
    public void testServerSide2() throws Exception {
     
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {
           
            public void onRequest(IHttpExchange exchange) throws IOException {
             
              BodyDataSink ds = exchange.send(new HttpResponseHeader(200, "text/plain"), 10);
              ds.flush();
View Full Code Here

   
   
    @Test
    public void testServerSide3() throws Exception {
     
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {
           
            public void onRequest(IHttpExchange exchange) throws IOException {
             
              BodyDataSink ds = exchange.send(new HttpResponseHeader(200, "text/plain"));
              ds.write("1234567890");
View Full Code Here

   
    @Test
    public void testServerSide4() throws Exception {
     
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {
           
            public void onRequest(IHttpExchange exchange) throws IOException {
             
              BodyDataSink ds = exchange.send(new HttpResponseHeader(200, "text/plain"));
             
View Full Code Here

    @Test
    public void testServerSide5() throws Exception {
     
      final byte[] data = QAUtil.generateByteArray(10000);
   
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {
           
            public void onRequest(IHttpExchange exchange) throws IOException {
                exchange.send(new HttpResponse(200, "text/plain", data));
            }           
        };  
View Full Code Here

    }       
   
    @Test
    public void testServerSide6() throws Exception {
     
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {
           
            public void onRequest(IHttpExchange exchange) throws IOException {
             
              BodyDataSink ds = exchange.send(new HttpResponseHeader(200, "text/plain"));
              ds.flush();
View Full Code Here

   
   
    @Test
    public void testServerSide7() throws Exception {
     
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {
           
            public void onRequest(IHttpExchange exchange) throws IOException {
             
              BodyDataSink ds = exchange.send(new HttpResponseHeader(200, "text/plain"));
              ds.setFlushmode(FlushMode.ASYNC);
View Full Code Here

       
   
    @Test
    public void testServerSide8() throws Exception {
     
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {
           
            public void onRequest(IHttpExchange exchange) throws IOException {
             
              BodyDataSink ds = exchange.send(new HttpResponseHeader(200, "text/plain"));
              ds.setFlushmode(FlushMode.ASYNC);
View Full Code Here

    @Test
    public void testServerSide9() throws Exception {
     
      final byte[] data = QAUtil.generateByteArray(10000);
   
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {
           
            public void onRequest(IHttpExchange exchange) throws IOException {
                exchange.send(new HttpResponse(200, "text/plain", data));
            }           
        };  
View Full Code Here

    }           
   
    @Test
    public void testServerSideUncompressed() throws Exception {
     
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {
           
            public void onRequest(IHttpExchange exchange) throws IOException {
                exchange.send(new HttpResponse(200, "text/plain", "1234567890"));
            }           
        };  
View Full Code Here

TOP

Related Classes of org.xlightweb.IHttpRequestHandler

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.