com.sshtools.net
Class SocketTransport

java.lang.Object
  extended byjava.net.Socket
      extended bycom.sshtools.net.SocketTransport
All Implemented Interfaces:
SocketTimeoutSupport, SshIO, SshTransport

public class SocketTransport
extends java.net.Socket
implements SshTransport, SocketTimeoutSupport

Extends a Socket to provide an SshTransport suitable for use in making connections using the SshConnector.

Author:
Lee David Painter

Constructor Summary
SocketTransport(java.lang.String hostname, int port)
          Connect the socket.
 
Method Summary
 SshTransport duplicate()
          Create a new copy of this transport and connect to the same host:port combination.
 java.lang.String getHost()
          Get the hostname of the connected host.
 
Methods inherited from class java.net.Socket
bind, close, connect, connect, getChannel, getInetAddress, getInputStream, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOutputStream, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.maverick.ssh.SshTransport
getPort
 
Methods inherited from interface com.maverick.ssh.SshIO
close, getInputStream, getOutputStream
 
Methods inherited from interface com.maverick.ssh.SocketTimeoutSupport
getSoTimeout, setSoTimeout
 

Constructor Detail

SocketTransport

public SocketTransport(java.lang.String hostname,
                       int port)
                throws java.io.IOException
Connect the socket.

Parameters:
hostname -
port -
Throws:
java.io.IOException
Method Detail

getHost

public java.lang.String getHost()
Get the hostname of the connected host.

Specified by:
getHost in interface SshTransport
Returns:
the name of the connected host

duplicate

public SshTransport duplicate()
                       throws java.io.IOException
Description copied from interface: SshTransport
Create a new copy of this transport and connect to the same host:port combination. This is used by the SshClient to duplicate a client connection.

Specified by:
duplicate in interface SshTransport
Returns:
Throws:
java.io.IOException


Copyright © 2003 3SP LTD. All Rights Reserved.