private class TcpEndpoint.ConnectionEndpointImpl extends Object implements ConnectionEndpoint
Constructor and Description |
---|
TcpEndpoint.ConnectionEndpointImpl() |
Modifier and Type | Method and Description |
---|---|
private void |
checkResolvePermission() |
Connection |
connect(OutboundRequestHandle handle)
Invoked by ConnectionManager to create a new connection.
|
Connection |
connect(OutboundRequestHandle handle,
Collection active,
Collection idle)
Invoked by ConnectionManager to reuse an existing
connection.
|
private Socket |
connectToHost(Constraints.Distilled distilled)
Returns a socket connected to this endpoint's host and
port, according the specified constraints.
|
private Socket |
connectToSocketAddress(SocketAddress socketAddress,
Constraints.Distilled distilled)
Returns a socket connected to the specified address, with a
timeout governed by the specified constraints.
|
private Socket |
newSocket()
Returns a new unconnected socket, using this endpoint's
socket factory if non-null.
|
public Connection connect(OutboundRequestHandle handle) throws IOException
connect
in interface ConnectionEndpoint
handle
- the handle for the requestIOException
- if an I/O exception occursprivate Socket connectToHost(Constraints.Distilled distilled) throws IOException
IOException
private Socket connectToSocketAddress(SocketAddress socketAddress, Constraints.Distilled distilled) throws IOException
IOException
private Socket newSocket() throws IOException
IOException
public Connection connect(OutboundRequestHandle handle, Collection active, Collection idle)
connect
in interface ConnectionEndpoint
handle
- the handle for the requestactive
- the connections with requests in progressidle
- the connections with no requests in progressnull
private void checkResolvePermission()
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.