public interface ForwardedTCPIPDaemon extends Runnable
All implementations should provide a no-argument constructor, as this one is used when creating an instance.
When someone connects to the remote socket, we create an instance using
the no-argument constructor, then call
setChannel (with the streams connected to the
remote socket) and
setArg with the arguments given
when the channel was created. Then we create a new Thread executing the
|Modifier and Type||Method and Description|
Does the actual connection handling.
Sets additional arguments given when the forwarding was created.
Sets the streams to be used for communication.
void setChannel(ChannelForwardedTCPIP channel, InputStream in, OutputStream out)
channel- the channel connected to the remote socket. This object may be used to disconnect, for example.
in- all data arriving from the remote socket can be read from this stream.
out- all data written to this stream will be sent to the remote socket.
void setArg(Object arg)
arg- arguments to be used by the deamon, the meaning is application specific. We should not change this array, as all subsequent daemons for this same port forwarding will be affected.
Session.setPortForwardingR(String, int, String, Object)
connect()) and should close the channel at the end (otherwise we will have a dangling connection, if the remote client host does not close it).
This is a simplified version of the inofficial Javadoc created by Paŭlo Ebermann. Have a look at the official homepage.