|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jscape.inet.ssh.SshConnection
public class SshConnection
SSH connection.
Constructor Summary | |
---|---|
SshConnection(ConnectionClient connection,
Channel channel,
boolean owner)
Creates a new connection instance. |
Method Summary | |
---|---|
void |
close()
Closes the current connection. |
Channel |
getChannel()
Returns underlayed channel. |
ConnectionClient |
getConnection()
Returns underlayed connection. |
java.io.InputStream |
getInputStream()
Returns connection input stream. |
java.lang.String |
getLocalAddress()
Returns local address. |
int |
getLocalPort()
Returns local port. |
java.io.OutputStream |
getOutputStream()
Returns connection output stream. |
java.lang.String |
getRemoteAddress()
Returns remote end address. |
int |
getRemotePort()
Returns remote end port. |
long |
getTimeout()
Returns connection timeout. |
boolean |
isClosed()
Checks if connection is already closed. |
boolean |
isOwner()
Checks if the underlayed connection is owned by current instance. |
void |
setTimeout(long timeout)
Setups connection timeout. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SshConnection(ConnectionClient connection, Channel channel, boolean owner)
connection
- connectionchannel
- channelowner
- ownership flagMethod Detail |
---|
public java.lang.String getRemoteAddress()
com.jscape.inet.util.connection.Connection
getRemoteAddress
in interface com.jscape.inet.util.connection.Connection
Connection.getRemoteAddress()
public int getRemotePort()
com.jscape.inet.util.connection.Connection
getRemotePort
in interface com.jscape.inet.util.connection.Connection
Connection.getRemotePort()
public java.lang.String getLocalAddress()
com.jscape.inet.util.connection.Connection
getLocalAddress
in interface com.jscape.inet.util.connection.Connection
Connection.getLocalAddress()
public int getLocalPort()
com.jscape.inet.util.connection.Connection
getLocalPort
in interface com.jscape.inet.util.connection.Connection
Connection.getLocalPort()
public long getTimeout() throws java.io.IOException
com.jscape.inet.util.connection.Connection
getTimeout
in interface com.jscape.inet.util.connection.Connection
java.io.IOException
- if an error occursConnection.getTimeout()
public void setTimeout(long timeout) throws java.io.IOException
com.jscape.inet.util.connection.Connection
setTimeout
in interface com.jscape.inet.util.connection.Connection
timeout
- new timeout value
java.io.IOException
- if an error occursConnection.setTimeout(long)
public java.io.InputStream getInputStream() throws java.io.IOException
com.jscape.inet.util.connection.Connection
getInputStream
in interface com.jscape.inet.util.connection.Connection
java.io.IOException
- if an I/O error occursConnection.getInputStream()
public java.io.OutputStream getOutputStream() throws java.io.IOException
com.jscape.inet.util.connection.Connection
getOutputStream
in interface com.jscape.inet.util.connection.Connection
java.io.IOException
- if an I/O error occursConnection.getOutputStream()
public boolean isClosed()
com.jscape.inet.util.connection.Connection
isClosed
in interface com.jscape.inet.util.connection.Connection
true
if connection is closed;
false
otherwiseConnection.isClosed()
public ConnectionClient getConnection()
public Channel getChannel()
public boolean isOwner()
true
if underlayed connection is owned;
false
otherwisepublic void close()
com.jscape.inet.util.connection.Connection
close
in interface com.jscape.inet.util.connection.Connection
Connection.close()
|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |