Deprecated
(4.3) use PoolingHttpClientConnectionManager.
ClientConnectionOperator. It uses a SchemeRegistry
to look up SchemeSocketFactory objects.
This connection operator is multihome network aware and will attempt to retry failed connects
against all known IP addresses sequentially until the connect is successful or all known
addresses fail to respond. Please note the same
org. value will be used
for each connection attempt, so in the worst case the total elapsed time before timeout
can be CONNECTION_TIMEOUT * n where n is the number of IP addresses
of the given host. One can disable multihome support by overriding
the resolveHostname(String) method and returning only one IP address for the given
host name.
The following parameters can be used to customize the behavior of this class:
org.apache.http.params.CoreProtocolPNames#HTTP_ELEMENT_CHARSET org.apache.http.params.CoreConnectionPNames#SO_TIMEOUT org.apache.http.params.CoreConnectionPNames#SO_LINGER org.apache.http.params.CoreConnectionPNames#SO_REUSEADDR org.apache.http.params.CoreConnectionPNames#TCP_NODELAY org.apache.http.params.CoreConnectionPNames#SOCKET_BUFFER_SIZE org.apache.http.params.CoreConnectionPNames#CONNECTION_TIMEOUT org.apache.http.params.CoreConnectionPNames#MAX_LINE_LENGTH | Modifier and Type | Field and Description |
|---|---|
| protected final DnsResolver | dnsResolver
the custom-configured DNS lookup mechanism. |
| private final Log | |
| protected final SchemeRegistry | schemeRegistry
The scheme registry for looking up socket factories. |
| Access | Constructor and Description |
|---|---|
| public | DefaultClientConnectionOperator(final SchemeRegistry
the scheme registry schemes)
Deprecated
as a consequence of
Creates a new client connection operator for the given scheme registry.
SchemeRegistry being deprecated.
|
| public | DefaultClientConnectionOperator(final SchemeRegistry
the scheme registry schemes, final DnsResolver the custom DNS lookup mechanism dnsResolver)
Deprecated
as a consequence of
Creates a new client connection operator for the given scheme registry
and the given custom DNS lookup mechanism.
SchemeRegistry being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| public OperatedClientConnection | createConnection()
Implements org.
Deprecated
as a consequence of
Creates a new connection that can be operated.
OperatedClientConnection being deprecated.
|
| private SchemeRegistry | getSchemeRegistry(final HttpContext context)
Deprecated
as a consequence of
SchemeRegistry being deprecated.
|
| public void | openConnection(final OperatedClientConnection
the connection to open conn, final HttpHost the target host to connect to target, final InetAddress the local address to route from, or
local, final HttpContext null for the defaultthe context for the connection context, final HttpParams the parameters for the connection params)Implements org.
Deprecated
as a consequence of
Opens a connection to the given target host.
OperatedClientConnection and HttpParams being deprecated.
|
| protected void | prepareSocket(final Socket
the socket to prepare sock, final HttpContext the context for the connection context, final HttpParams the parameters from which to prepare the socket params)
Deprecated
as a consequence of
Performs standard initializations on a newly created socket.
HttpParams being deprecated.
|
| protected InetAddress[] | Returns: array of IP addresseshost name to resolve host)Resolves the given host name to an array of corresponding IP addresses, based on the configured name service on the provided DNS resolver. |
| public void | updateSecureConnection(final OperatedClientConnection
the open connection to update conn, final HttpHost the target host for the updated connection.
The connection must already be open or tunnelled
to the host and port, but the scheme of the target
will be used to create a layered connection. target, final HttpContext the context for the connection context, final HttpParams the parameters for the updated connection params)Implements org.
Deprecated
as a consequence of
Updates a connection with a layered secure connection.
OperatedClientConnection and HttpParams being deprecated.
|
| dnsResolver | back to summary |
|---|---|
| protected final DnsResolver dnsResolver the custom-configured DNS lookup mechanism. | |
| log | back to summary |
|---|---|
| private final Log log | |
| schemeRegistry | back to summary |
|---|---|
| protected final SchemeRegistry schemeRegistry
Deprecated as a consequence of The scheme registry for looking up socket factories. | |
| DefaultClientConnectionOperator | back to summary |
|---|---|
| public DefaultClientConnectionOperator(final SchemeRegistry schemes)
Deprecated as a consequence of Creates a new client connection operator for the given scheme registry.
| |
| DefaultClientConnectionOperator | back to summary |
|---|---|
| public DefaultClientConnectionOperator(final SchemeRegistry schemes, final DnsResolver dnsResolver)
Deprecated as a consequence of Creates a new client connection operator for the given scheme registry and the given custom DNS lookup mechanism.
| |
| createConnection | back to summary |
|---|---|
| public OperatedClientConnection createConnection() Implements org. Doc from org. Deprecated as a consequence of Creates a new connection that can be operated.
| |
| getSchemeRegistry | back to summary |
|---|---|
| private SchemeRegistry getSchemeRegistry(final HttpContext context)
Deprecated as a consequence of | |
| openConnection | back to summary |
|---|---|
| public void openConnection(final OperatedClientConnection conn, final HttpHost target, final InetAddress local, final HttpContext context, final HttpParams params) throws IOException Implements org. Doc from org. Deprecated as a consequence of Opens a connection to the given target host.
| |
| prepareSocket | back to summary |
|---|---|
| protected void prepareSocket(final Socket sock, final HttpContext context, final HttpParams params) throws IOException
Deprecated as a consequence of Performs standard initializations on a newly created socket.
| |
| resolveHostname | back to summary |
|---|---|
| protected InetAddress[] resolveHostname(final String host) throws UnknownHostException Resolves the given host name to an array of corresponding IP addresses, based on the configured name service on the provided DNS resolver. If one wasn't provided, the system configuration is used.
| |
| updateSecureConnection | back to summary |
|---|---|
| public void updateSecureConnection(final OperatedClientConnection conn, final HttpHost target, final HttpContext context, final HttpParams params) throws IOException Implements org. Doc from org. Deprecated as a consequence of Updates a connection with a layered secure connection. The typical use of this method is to update a tunnelled plain connection (HTTP) to a secure TLS/SSL connection (HTTPS).
| |