Example #1
0
  /** Used to iterate and interpret byte sent over the socket. */
  private void parseInboundMessages() throws IOException {
    String request = null;

    while ((request = server.readNextTokenFromSocket()) != null) {
      // TODO: handling of malformed XML         processTestReport(request);
    }
  }
Example #2
0
  // TODO: Clean up exception handling
  public Object call() throws Exception {
    try {
      server.start();
      parseInboundMessages();
    } catch (IOException e) {
      throw new BuildException("error receiving report from flexunit", e);
    } finally {
      try {
        server.stop();
      } catch (IOException e) {
        throw new BuildException("could not close client/server socket");
      }
    }

    // All done, let the process that spawned me know I've returned.
    return null;
  }