| java.lang.Object sun.rmi.transport.tcp.ConnectionMultiplexer
ConnectionMultiplexer | final class ConnectionMultiplexer (Code) | | ConnectionMultiplexer manages the transparent multiplexing of
multiple virtual connections from one endpoint to another through
one given real connection to that endpoint. The input and output
streams for the the underlying real connection must be supplied.
A callback object is also supplied to be informed of new virtual
connections opened by the remote endpoint. After creation, the
run() method must be called in a thread created for demultiplexing
the connections. The openConnection() method is called to
initiate a virtual connection from this endpoint.
author: Peter Jones |
logLevel | static int logLevel(Code) | | "multiplex" log level
|
multiplexLog | final static Log multiplexLog(Code) | | |
ConnectionMultiplexer | public ConnectionMultiplexer(TCPChannel channel, InputStream in, OutputStream out, boolean orig)(Code) | | Create a new ConnectionMultiplexer using the given underlying
input/output stream pair. The run method must be called
(possibly on a new thread) to handle the demultiplexing.
Parameters: channel - object to notify when new connection is received Parameters: in - input stream of underlying connection Parameters: out - output stream of underlying connection Parameters: orig - true if this endpoint intiated the underlyingconnection (needs to be set differently at both ends) |
finalize | protected void finalize() throws Throwable(Code) | | Shut down connection upon finalization.
|
openConnection | public synchronized TCPConnection openConnection() throws IOException(Code) | | Initiate a new multiplexed connection through the underlying
connection.
|
run | public void run() throws IOException(Code) | | Process multiplexing protocol received from underlying connection.
|
sendRequest | void sendRequest(MultiplexConnectionInfo info, int len) throws IOException(Code) | | Send request for more data on connection to remote endpoint.
Parameters: info - connection information structure Parameters: len - number of more bytes that can be received |
sendTransmit | void sendTransmit(MultiplexConnectionInfo info, byte buf, int off, int len) throws IOException(Code) | | Send packet of requested data on connection to remote endpoint.
Parameters: info - connection information structure Parameters: buf - array containg bytes to send Parameters: off - offset of first array index of packet Parameters: len - number of bytes in packet to send |
shutDown | public void shutDown()(Code) | | Shut down all connections and clean up.
|
|
|