Additional top-level class in compilation unit: ConnectionAcceptor.
| Modifier and Type | Field and Description |
|---|---|
| private ConnectionAcceptor | acceptor
connection acceptor (should be in TCPTransport) |
| private final TCPEndpoint | ep
endpoint for this channel |
| private final List | freeList
list of cached connections |
| private static final int | handshakeTimeout
client-side connection handshake read timeout |
| private static final long | idleTimeout
client-side connection idle usage timeout |
| private Future | reaper
frees cached connections that have expired (guarded by freeList) |
| private static final int | responseTimeout
client-side connection response read timeout (after handshake) |
| private static final ScheduledExecutorService | scheduler
thread pool for scheduling delayed tasks |
| private final TCPTransport | tr
transport for this channel |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private Connection | |
| public void | free(Connection
The connection conn, boolean If true, the connection is in a state in which it
can be reused for another method call. reuse)Implements sun. Free the connection generated by this channel. |
| private void | |
| public Endpoint | getEndpoint()
Implements sun. Return the endpoint for this channel. |
| public Connection | newConnection()
Implements sun. Supplies a connection to the endpoint of the address space for which this is a channel. |
| public void | |
| private void |
| acceptor | back to summary |
|---|---|
| private ConnectionAcceptor acceptor connection acceptor (should be in TCPTransport) | |
| ep | back to summary |
|---|---|
| private final TCPEndpoint ep endpoint for this channel | |
| freeList | back to summary |
|---|---|
| private final List<TCPConnection> freeList list of cached connections | |
| handshakeTimeout | back to summary |
|---|---|
| private static final int handshakeTimeout client-side connection handshake read timeout | |
| idleTimeout | back to summary |
|---|---|
| private static final long idleTimeout client-side connection idle usage timeout | |
| reaper | back to summary |
|---|---|
| private Future<?> reaper frees cached connections that have expired (guarded by freeList) | |
| responseTimeout | back to summary |
|---|---|
| private static final int responseTimeout client-side connection response read timeout (after handshake) | |
| scheduler | back to summary |
|---|---|
| private static final ScheduledExecutorService scheduler thread pool for scheduling delayed tasks | |
| tr | back to summary |
|---|---|
| private final TCPTransport tr transport for this channel | |
| TCPChannel | back to summary |
|---|---|
| pack-priv TCPChannel(TCPTransport tr, TCPEndpoint ep) Create channel for endpoint. | |
| createConnection | back to summary |
|---|---|
| private Connection createConnection() throws RemoteException Create a new connection to the remote endpoint of this channel. The returned connection is new. The caller must already have passed a security checkConnect or equivalent. | |
| free | back to summary |
|---|---|
| public void free(Connection conn, boolean reuse) Implements sun. Free the connection generated by this channel.
| |
| freeCachedConnections | back to summary |
|---|---|
| private void freeCachedConnections() | |
| getEndpoint | back to summary |
|---|---|
| public Endpoint getEndpoint() Implements sun. Return the endpoint for this channel. | |
| newConnection | back to summary |
|---|---|
| public Connection newConnection() throws RemoteException Implements sun. Supplies a connection to the endpoint of the address space for which this is a channel. The returned connection may be one retrieved from a cache of idle connections. | |
| shedCache | back to summary |
|---|---|
| public void shedCache() Closes all the connections in the cache, whether timed out or not. | |
| writeTransportHeader | back to summary |
|---|---|
| private void writeTransportHeader(DataOutputStream out) throws RemoteException Send transport header over stream. | |