Examples of serve()


Examples of fitnesse.socketservice.SocketServer.serve()

  public void shouldPassIncomingConnectionToSocketAccepter() throws IOException, InterruptedException {
    SocketAccepter accepter = mock(SocketAccepter.class);
    SocketServer server = new SocketCatcher(accepter, 1);
    MockSocket socket = new MockSocket("GET /?responder=socketCatcher&ticket=1 HTTP/1.1\r\n\r\n");

    server.serve(socket);

    verify(accepter).acceptSocket(socket);
  }

  @Test(expected = IllegalArgumentException.class)
View Full Code Here

Examples of io.undertow.server.handlers.resource.Resource.serve()

                return delegate.getContentType(mimeMappings);
            }

            @Override
            public void serve(Sender sender, HttpServerExchange exchange, IoCallback completionCallback) {
                delegate.serve(sender, exchange, completionCallback);
            }

            @Override
            public Long getContentLength() {
                return delegate.getContentLength();
View Full Code Here

Examples of net.reversehttp.HttpServer.serve()

                        }
                        public void handleDelivery(String topic, byte[] body) {
                            System.out.println("Received message:\n\"" + new String(body) + "\"");
                        }
                    }));
            httpd.serve();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of net.reversehttp.HttpServer.serve()

            int port = (args.length > 0) ? Integer.parseInt(args[0]) : 8000;
      Logger.getLogger(TestReverseHttpService.class.getName()).log
    (Level.FINE, "Starting on port " + port);
            HttpServer httpd = new NormalHttpServer(port,
                    new TestNormalHttpService());
            httpd.serve();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of net.reversehttp.HttpServer.serve()

            Address targetAddress = new Address("queue", containerDomain);
            container.bindName(targetAddress, new Sub(targetAddress, Address
                    .parse(sourceStr)));
            HttpServer httpd = new ReverseHttpServer(label, serverUrl,
                    container);
            httpd.serve();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
View Full Code Here

Examples of net.reversehttp.HttpServer.serve()

            URL reflectorUrl = new URL("http://" + hostAndPort + "/reversehttp");
            TestReverseHttpService service = new TestReverseHttpService();
            HttpServer httpd = new ReverseHttpServer(label, reflectorUrl,
                    service);
            ((ReverseHttpServer) httpd).addPropertyChangeListener(service);
            httpd.serve();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of net.reversehttp.HttpServer.serve()

            ServiceContainer container = new ServiceContainer(ownAddress
                    .getDomain());
            container.bindName(ownAddress, new Sub(ownAddress, Address
                    .parse(sourceStr)));
            HttpServer httpd = new NormalHttpServer(port, container);
            httpd.serve();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
View Full Code Here

Examples of net.reversehttp.NormalHttpServer.serve()

                        }
                        public void handleDelivery(String topic, byte[] body) {
                            System.out.println("Received message:\n\"" + new String(body) + "\"");
                        }
                    }));
            httpd.serve();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of net.reversehttp.NormalHttpServer.serve()

            int port = (args.length > 0) ? Integer.parseInt(args[0]) : 8000;
      Logger.getLogger(TestReverseHttpService.class.getName()).log
    (Level.FINE, "Starting on port " + port);
            HttpServer httpd = new NormalHttpServer(port,
                    new TestNormalHttpService());
            httpd.serve();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of net.reversehttp.NormalHttpServer.serve()

            ServiceContainer container = new ServiceContainer(ownAddress
                    .getDomain());
            container.bindName(ownAddress, new Sub(ownAddress, Address
                    .parse(sourceStr)));
            HttpServer httpd = new NormalHttpServer(port, container);
            httpd.serve();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
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.