Exemplo n.º 1
0
 public static void main(String arg[]) throws InterruptedException, AppException {
   QuickServer qs =
       new QuickServer(
           new ClientCommandHandler() {
             @Override
             public void handleCommand(ClientHandler handler, String command)
                 throws SocketTimeoutException, IOException {
               System.out.println("command=" + command);
             }
           },
           9999);
   qs.startServer();
 }
  public void setUp() {
    server = new QuickServer();
    client = new BlockingClient();
    configServer();

    server.initService(config);

    TestEventHandler.reset();
    TestCommandHandler.reset();

    try {
      server.startServer();
    } catch (Exception e) {
      server = null;
      fail("Server could not start: " + e);
    }
  }