Example #1
0
  public synchronized void clientCreated(ClientHandler client) {

    if (lastMsg != LastMessages.ClientCreated) {
      ensureNewline();
      lastMsg = LastMessages.ClientCreated;
      if (color) out.print(gray);
      out.print("[Client created ] " + client.getName());
      out.flush();
    } else {
      out.print(" " + client.getName());
      out.flush();
    }
  }
Example #2
0
  public synchronized void clientSent(ProcessHandler processHandler) {
    if (!(processHandler instanceof ClientHandler)) return;
    ClientHandler client = (ClientHandler) processHandler;

    if (lastMsg != LastMessages.Sent) {
      ensureNewline();
      lastMsg = LastMessages.Sent;
      if (color) out.print(gray);
      out.print("[Send executed  ] " + client.getName());
      out.flush();
    } else {
      out.print(" " + client.getName());
      out.flush();
    }
  }