| Modifier and Type | Field and Description |
|---|---|
| private Channel | |
| private long | |
| private InputStream | |
| private long | |
| private OutputStream | |
| private long | |
| private Socket |
| Access | Constructor and Description |
|---|---|
| pack-priv | TCPConnection(TCPChannel ch, Socket s, InputStream in, OutputStream out)
Constructor used for creating a connection to accept call (an input connection) |
| pack-priv | TCPConnection(TCPChannel ch, InputStream in, OutputStream out)
Constructor used by subclass when underlying input and output streams are already available. |
| pack-priv | TCPConnection(TCPChannel ch, Socket s)
Constructor used when socket is available, but not underlying streams. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| pack-priv boolean | expired(long
The current time. time)Returns true if the timeout has expired on this connection; otherwise returns false. |
| public Channel | getChannel()
Implements sun. Returns the channel for this connection. |
| public InputStream | getInputStream()
Implements sun. Gets the input stream for this connection. |
| public OutputStream | getOutputStream()
Implements sun. Gets the output stream for this connection |
| public boolean | Returns: true if the connection and server are recently aliveProbes the connection to see if it still alive and connected to a responsive server. |
| public boolean | isReusable()
Implements sun. Determine if this connection can be used for multiple operations. |
| public void | releaseInputStream()
Implements sun. Release the input stream for this connection. |
| public void | releaseOutputStream()
Implements sun. Release the output stream for this connection. |
| pack-priv void | setExpiration(long
The time at which the time out expires. time)Set the expiration time of this connection. |
| pack-priv void | setLastUseTime(long
The time at which the connection was last active. time)Set the timestamp at which this connection was last used successfully. |
| channel | back to summary |
|---|---|
| private Channel channel | |
| expiration | back to summary |
|---|---|
| private long expiration | |
| in | back to summary |
|---|---|
| private InputStream in | |
| lastuse | back to summary |
|---|---|
| private long lastuse | |
| out | back to summary |
|---|---|
| private OutputStream out | |
| roundtrip | back to summary |
|---|---|
| private long roundtrip | |
| socket | back to summary |
|---|---|
| private Socket socket | |
| TCPConnection | back to summary |
|---|---|
| pack-priv TCPConnection(TCPChannel ch, Socket s, InputStream in, OutputStream out) Constructor used for creating a connection to accept call (an input connection) | |
| TCPConnection | back to summary |
|---|---|
| pack-priv TCPConnection(TCPChannel ch, InputStream in, OutputStream out) Constructor used by subclass when underlying input and output streams are already available. | |
| TCPConnection | back to summary |
|---|---|
| pack-priv TCPConnection(TCPChannel ch, Socket s) Constructor used when socket is available, but not underlying streams. | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements sun. Close the connection. | |
| expired | back to summary |
|---|---|
| pack-priv boolean expired(long time) Returns true if the timeout has expired on this connection; otherwise returns false.
| |
| getChannel | back to summary |
|---|---|
| public Channel getChannel() Implements sun. Returns the channel for this connection. | |
| getInputStream | back to summary |
|---|---|
| public InputStream getInputStream() throws IOException Implements sun. Gets the input stream for this connection. | |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream() throws IOException Implements sun. Gets the output stream for this connection | |
| isDead | back to summary |
|---|---|
| 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.
| |
| isReusable | back to summary |
|---|---|
| public boolean isReusable() Implements sun. 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. | |
| releaseInputStream | back to summary |
|---|---|
| public void releaseInputStream() Implements sun. Release the input stream for this connection. | |
| releaseOutputStream | back to summary |
|---|---|
| public void releaseOutputStream() throws IOException Implements sun. Release the output stream for this connection. | |
| setExpiration | back to summary |
|---|---|
| pack-priv void setExpiration(long time) Set the expiration time of this connection.
| |
| setLastUseTime | back to summary |
|---|---|
| pack-priv void setLastUseTime(long time) Set the timestamp at which this connection was last used successfully. The connection will be pinged for liveness if reused long after this time.
| |