Ejemplo n.º 1
0
  public void run() {
    try {
      _conn = new Pop3Connection(this, _socket);
      _state = new Pop3State(_manager);

      _quitting = false;

      sendGreetings();

      while (!_quitting) {
        handleCommand();
      }

      _conn.close();
    } catch (SocketTimeoutException ste) {
      _conn.println("421 Service shutting down and closing transmission channel");

    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      try {
        _socket.close();
      } catch (IOException ioe) {
        ioe.printStackTrace();
      }
    }
  }