|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sshtools.net.SocketWrapper
Implements a basic wrapper around a Socket to provide an SshTransport suitable for use in making connections using the SshConnector.
| Field Summary | |
protected java.net.Socket |
socket
|
| Constructor Summary | |
SocketWrapper(java.net.Socket socket)
Create a SocketWrapper |
|
| Method Summary | |
void |
close()
Close the channel. |
SshTransport |
duplicate()
Create a new copy of this transport and connect to the same host:port combination. |
java.lang.String |
getHost()
Get the name of the connected host. |
java.io.InputStream |
getInputStream()
Get an InputStream to read incoming channel data. |
java.io.OutputStream |
getOutputStream()
Get an OutputStream to write outgoing channel data. |
int |
getPort()
Get the port of this connection |
int |
getSoTimeout()
Get the current socket timeout in milliseconds. |
void |
setSoTimeout(int timeout)
Set the socket timeout in milliseconds. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.net.Socket socket
| Constructor Detail |
public SocketWrapper(java.net.Socket socket)
socket - | Method Detail |
public java.io.InputStream getInputStream()
throws java.io.IOException
SshIO
getInputStream in interface SshIOjava.io.IOException
public java.io.OutputStream getOutputStream()
throws java.io.IOException
SshIO
getOutputStream in interface SshIOjava.io.IOExceptionpublic java.lang.String getHost()
SshTransport
getHost in interface SshTransportpublic int getPort()
SshTransport
getPort in interface SshTransport
public void close()
throws java.io.IOException
SshIO
close in interface SshIOjava.io.IOException
public SshTransport duplicate()
throws java.io.IOException
SshTransport
duplicate in interface SshTransportjava.io.IOException
public void setSoTimeout(int timeout)
throws java.io.IOException
SocketTimeoutSupport
setSoTimeout in interface SocketTimeoutSupporttimeout - int
java.io.IOException
public int getSoTimeout()
throws java.io.IOException
SocketTimeoutSupport
getSoTimeout in interface SocketTimeoutSupportjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||