public class

TCPConnection

extends Object
implements Connection
java.lang.Object
   ↳ sun.rmi.transport.tcp.TCPConnection

Summary

Public Methods
void close()
Close the connection.
Channel getChannel()
Returns the channel for this connection.
InputStream getInputStream()
Gets the input stream for this connection.
OutputStream getOutputStream()
Gets the output stream for this connection
boolean isDead()
Probes the connection to see if it still alive and connected to a responsive server.
boolean isReusable()
Determine if this connection can be used for multiple operations.
void releaseInputStream()
Release the input stream for this connection.
void releaseOutputStream()
Release the output stream for this connection.
[Expand]
Inherited Methods
From class java.lang.Object
From interface sun.rmi.transport.Connection

Public Methods

public void close ()

Close the connection.

Throws
IOException

public Channel getChannel ()

Returns the channel for this connection.

public InputStream getInputStream ()

Gets the input stream for this connection.

Throws
IOException

public OutputStream getOutputStream ()

Gets the output stream for this connection

Throws
IOException

public boolean isDead ()

Probes the connection to see if it still alive and connected to a responsive server. If the connection has been idle for too long, the server is pinged. ``Too long'' means ``longer than the last ping round-trip time''.

This method may misdiagnose a dead connection as live, but it will never misdiagnose a live connection as dead.

Returns
  • true if the connection and server are recently alive

public boolean isReusable ()

Determine if this connection can be used for multiple operations. If the socket implements RMISocketInfo, then we can query it about this; otherwise, assume that it does provide a full-duplex persistent connection like java.net.Socket.

public void releaseInputStream ()

Release the input stream for this connection.

public void releaseOutputStream ()

Release the output stream for this connection.

Throws
IOException