Sun Adapter for Batch/FTP

com.stc.eways.batchext
Class SSHClient

java.lang.Object
  extended by com.stc.eways.batchext.SSHClient

public class SSHClient
extends java.lang.Object

This class is used to fork an SSH client process with the port forwarding feature. Once the SSH secure channel is established, the Batch e*Way's FTP component can tunnel its command connection through this secure SSH channel. This SSH channel is kept alive until or unless the e*Way is shut down.

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

Constructor Summary
SSHClient(SSHConfiguration sshConfig)
          Constructor.
 
Method Summary
 boolean isLaunched()
          This method allows you to verify that the SSH sub-process is available.
 void launch()
          Launches an SSH sub-process.
static void main(java.lang.String[] args)
          Used to do stand-alone testing.
 void terminate()
          Terminates an SSH sub-process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSHClient

public SSHClient(SSHConfiguration sshConfig)
          throws SSHException
Constructor. Takes an SSHConfiguration instance as its input.

Parameters:
sshConfig - An SSHConfiguration instance.
Throws:
SSHException - If some error occurs.
Method Detail

main

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

Parameters:
args - Command line parameters.
Throws:
java.lang.Exception - If some error occurs.

launch

public void launch()
            throws SSHException
Launches an SSH sub-process.

Throws:
SSHException - If some error occurs.

terminate

public void terminate()
Terminates an SSH sub-process. Any corresponding data-stream threads are also terminated.


isLaunched

public boolean isLaunched()
This method allows you to verify that the SSH sub-process is available.

Returns:
true means the SSH client is launched and is ready to be used.

Sun Adapter for Batch/FTP