com.sshtools.net
Class SocketWrapper
java.lang.Object
com.sshtools.net.SocketWrapper
- All Implemented Interfaces:
- SocketTimeoutSupport, SshIO, SshTransport
- Direct Known Subclasses:
- HttpProxyTransportWrapper
public class SocketWrapper
- extends java.lang.Object
- implements SshTransport, SocketTimeoutSupport
Implements a basic wrapper around a Socket to provide an
SshTransport suitable
for use in making connections using the SshConnector.
- Author:
- Lee David Painter
|
Field Summary |
protected java.net.Socket |
socket
|
|
Constructor Summary |
SocketWrapper(java.net.Socket socket)
Create a SocketWrapper |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
socket
protected java.net.Socket socket
SocketWrapper
public SocketWrapper(java.net.Socket socket)
- Create a SocketWrapper
- Parameters:
socket -
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
- Specified by:
getInputStream in interface SshIO
- Throws:
java.io.IOException
getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException
- Specified by:
getOutputStream in interface SshIO
- Throws:
java.io.IOException
getHost
public java.lang.String getHost()
- Specified by:
getHost in interface SshTransport
getPort
public int getPort()
- Specified by:
getPort in interface SshTransport
close
public void close()
throws java.io.IOException
- Specified by:
close in interface SshIO
- Throws:
java.io.IOException
duplicate
public SshTransport duplicate()
throws java.io.IOException
- Specified by:
duplicate in interface SshTransport
- Throws:
java.io.IOException
setSoTimeout
public void setSoTimeout(int timeout)
throws java.io.IOException
- Specified by:
setSoTimeout in interface SocketTimeoutSupport
- Throws:
java.io.IOException
getSoTimeout
public int getSoTimeout()
throws java.io.IOException
- Specified by:
getSoTimeout in interface SocketTimeoutSupport
- Throws:
java.io.IOException
getSocket
public java.net.Socket getSocket()
Copyright © 2012. All Rights Reserved.