Top Description Methods
org.apache.http.conn

public Interface ClientConnectionOperator

Known Direct Implementers
org.apache.http.impl.conn.DefaultClientConnectionOperator
Annotations
@Deprecated
Imports
java.io.IOException, java.net.InetAddress, org.apache.http.HttpHost, org.apache.http.params.HttpParams, org.apache.http.protocol.HttpContext

Deprecated

(4.3) replaced by HttpClientConnectionManager.

ClientConnectionOperator represents a strategy for creating OperatedClientConnection instances and updating the underlying java.net.Socket of those objects. Implementations will most likely make use of org.apache.http.conn.scheme.SchemeSocketFactorys to create java.net.Socket instances.

The methods in this interface allow the creation of plain and layered sockets. Creating a tunnelled connection through a proxy, however, is not within the scope of the operator.

Implementations of this interface must be thread-safe. Access to shared data must be synchronized as methods of this interface may be executed from multiple threads.

Since
4.0

Method Summary

Modifier and TypeMethod and Description
public OperatedClientConnection

Returns:

a new, unopened connection for use with this operator
createConnection
()

Deprecated as a consequence of OperatedClientConnection being deprecated.
Creates a new connection that can be operated.
public void
openConnection(OperatedClientConnection
the connection to open
conn
,
HttpHost
the target host to connect to
target
,
InetAddress
the local address to route from, or null for the default
local
,
HttpContext
the context for the connection
context
,
HttpParams
the parameters for the connection
params
)

Deprecated as a consequence of OperatedClientConnection and HttpParams being deprecated.
Opens a connection to the given target host.
public void
updateSecureConnection(OperatedClientConnection
the open connection to update
conn
,
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
,
HttpContext
the context for the connection
context
,
HttpParams
the parameters for the updated connection
params
)

Deprecated as a consequence of OperatedClientConnection and HttpParams being deprecated.
Updates a connection with a layered secure connection.

Method Detail

createConnectionback to summary
public OperatedClientConnection createConnection()

Deprecated

as a consequence of OperatedClientConnection being deprecated. See corresponding docs for further information.

Creates a new connection that can be operated.

Returns:OperatedClientConnection

a new, unopened connection for use with this operator

openConnectionback to summary
public void openConnection(OperatedClientConnection conn, HttpHost target, InetAddress local, HttpContext context, HttpParams params) throws IOException

Deprecated

as a consequence of OperatedClientConnection and HttpParams being deprecated. See corresponding docs for further information.

Opens a connection to the given target host.

Parameters
conn:OperatedClientConnection

the connection to open

target:HttpHost

the target host to connect to

local:InetAddress

the local address to route from, or null for the default

context:HttpContext

the context for the connection

params:HttpParams

the parameters for the connection

Exceptions
IOException:
in case of a problem
updateSecureConnectionback to summary
public void updateSecureConnection(OperatedClientConnection conn, HttpHost target, HttpContext context, HttpParams params) throws IOException

Deprecated

as a consequence of OperatedClientConnection and HttpParams being deprecated. See corresponding docs for further information.

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).

Parameters
conn:OperatedClientConnection

the open connection to update

target: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.

context:HttpContext

the context for the connection

params:HttpParams

the parameters for the updated connection

Exceptions
IOException:
in case of a problem