@Override
  public void run() {
    Socket clientSocket = connection.getSocket();
    ObjectInputStream input = connection.getInputStream();
    while (!clientSocket.isClosed()) {
      try {
        ServerMessage serverMessage = (ServerMessage) input.readObject();
        Server.getInstance().processMessage(serverMessage, connection);
      }
      catch (Exception e) {
        // message failed
      }
    }
  }