Exemple #1
0
  /** {@inheritDoc} */
  @Override
  public synchronized void stopApp() {
    super.stopApp();

    println(" ");
    println("Remote shell session terminated.");
    println("type ~. to exit rsh");
    println(" ");
    // Give a couple of seconds to help ensure that the message will be sent.
    try {
      Thread.sleep(2000);
    } catch (InterruptedException ie) {
    }
    getInputPipe().close();
    getOutputPipe().close();

    if (timerTask != null) {
      timerTask.cancel();
    }

    if (cons != null) {
      cons.destroy();
    }
  }