jssh
Class Options

java.lang.Object
  |
  +--jssh.Options

public class Options
extends java.lang.Object

This class encapsulates all the options that can be specified on the command-line for the SSH client.


Constructor Summary
Options()
           
 
Method Summary
 void addLocalPortForwarding(PortForwarding pf_)
          Adds the specified local port forwarding to the list of local ports to be forwarded to the server.
 void addRemotePortForwarding(PortForwarding pf_)
          Adds the specified port-forwarding to the list of server ports that must be forwarded to the client.
 boolean compressionEnabled()
          Returns true if compression is enabled.
 java.lang.String getCommand()
           
 boolean getDebug()
           
 java.lang.String getHostname()
           
 java.lang.String getIdentityFile()
           
 java.util.Iterator getLocalForwardings()
          Returns an iterator that allows the calling code to iterate through the list of local port-forwardings.
 int getPort()
           
 java.util.Iterator getRemoteForwardings()
          Returns an iterator that allows the calling code to iterate through the list of remote port-forwardings.
 java.awt.Dimension getTerminalSize()
           
 java.lang.String getTerminalType()
           
 java.lang.String getUser()
           
 boolean isPortOpenAllowed(java.lang.String hostname_, int port_)
          This method is called when an SSH_MSG_PORT_OPEN message is received.
 void setCommand(java.lang.String command_)
           
 void setCompression(boolean flag_)
           
 void setDebug(boolean debug_)
           
 void setHostname(java.lang.String hostname_)
           
 void setIdentityFile(java.lang.String filename_)
           
 void setPort(int port_)
           
 void setTerminalSize(int columns_, int rows_)
           
 void setTerminalType(java.lang.String term_)
          Set the terminal-type string that will be sent in the SSH_CMSG_REQUEST_PTY packet.
 void setUser(java.lang.String user_)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Options

public Options()
Method Detail

setHostname

public void setHostname(java.lang.String hostname_)

getHostname

public java.lang.String getHostname()

setCommand

public void setCommand(java.lang.String command_)

getCommand

public java.lang.String getCommand()

setPort

public void setPort(int port_)

getPort

public int getPort()

setUser

public void setUser(java.lang.String user_)

getUser

public java.lang.String getUser()

setCompression

public void setCompression(boolean flag_)

compressionEnabled

public boolean compressionEnabled()
Returns true if compression is enabled.


addLocalPortForwarding

public void addLocalPortForwarding(PortForwarding pf_)
Adds the specified local port forwarding to the list of local ports to be forwarded to the server.


addRemotePortForwarding

public void addRemotePortForwarding(PortForwarding pf_)
Adds the specified port-forwarding to the list of server ports that must be forwarded to the client.


getLocalForwardings

public java.util.Iterator getLocalForwardings()
Returns an iterator that allows the calling code to iterate through the list of local port-forwardings.


getRemoteForwardings

public java.util.Iterator getRemoteForwardings()
Returns an iterator that allows the calling code to iterate through the list of remote port-forwardings.


isPortOpenAllowed

public boolean isPortOpenAllowed(java.lang.String hostname_,
                                 int port_)
This method is called when an SSH_MSG_PORT_OPEN message is received.

Parameters:
hostname_ - the hostname contained in the SSH_MSG_PORT_OPEN.
port_ - the port contained in the SSH_MSG_PORT_OPEN.

setDebug

public void setDebug(boolean debug_)

getDebug

public boolean getDebug()

setTerminalType

public void setTerminalType(java.lang.String term_)
Set the terminal-type string that will be sent in the SSH_CMSG_REQUEST_PTY packet.


getTerminalType

public java.lang.String getTerminalType()

setTerminalSize

public void setTerminalSize(int columns_,
                            int rows_)

getTerminalSize

public java.awt.Dimension getTerminalSize()

setIdentityFile

public void setIdentityFile(java.lang.String filename_)

getIdentityFile

public java.lang.String getIdentityFile()