Example #1
0
 @Override
 public void cleanUp() {
   shutdownSystem();
   _log.info("Opening shutdown lock");
   _shutdownLock.open();
   System.exit(0);
 }
Example #2
0
  @Override
  public void cleanUp() {

    _log.info("Clean up called");
    println("");
    _out.close();
    _readyGate.check();
    _log.info("finished");
  }
Example #3
0
 @Override
 public void run() {
   if (Thread.currentThread() == _workerThread) {
     print(prompt());
     while (true) {
       try {
         if ((_lastCommand = _in.readLine()) == null) {
           break;
         }
         _commandCounter++;
         if (execute(_lastCommand) > 0) {
           //
           // we need to close the socket AND
           // have to go back to readLine to
           // finish the ssh protocol gracefully.
           //
           try {
             _out.close();
           } catch (Exception ee) {
           }
         } else {
           print(prompt());
         }
       } catch (IOException e) {
         _log.info("EOF Exception in read line : " + e);
         break;
       } catch (Exception e) {
         _log.info("I/O Error in read line : " + e);
         break;
       }
     }
     _log.info("EOS encountered");
     _readyGate.open();
     kill();
   }
 }