Sun Adapter for Batch/FTP

com.stc.eways.batchext
Class SSHStreamEater

java.lang.Object
  extended by com.stc.eways.batchext.SSHStreamEater
All Implemented Interfaces:
java.lang.Runnable

public class SSHStreamEater
extends java.lang.Object
implements java.lang.Runnable

This class is used to consume the STDOUT or STDERR from the SSH sub-process. NOTE: This class serves both STDOUT and STDERR. Both must be consumed, or else the current sub-process could hang up because of exhausted buffers.

Version:
cvs revision: $Revision: 1.5 $ Last Modified: $Date: 2008/02/25 16:56:24 $
Author:
Harry Liu

Constructor Summary
SSHStreamEater(SSHClient sshClient, java.lang.String device)
          Constructor.
 
Method Summary
static void main(java.lang.String[] args)
          Used to do stand-alone testing.
 void run()
          start() of this thread will execute this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSHStreamEater

public SSHStreamEater(SSHClient sshClient,
                      java.lang.String device)
Constructor.

Parameters:
process - The process object that represents the SSH subprocess.
sshConfig - The configurations of the SSH client.
device - The type of output from the SSH sub-process. It can be either STDERR or STDOUT.
Method Detail

run

public void run()
start() of this thread will execute this method.

Specified by:
run in interface java.lang.Runnable

main

public static void main(java.lang.String[] args)
Used to do stand-alone testing.

Parameters:
args - Command-line parameters.

Sun Adapter for Batch/FTP