Package org.apache.http.conn

The client-side connection management and handling API that provides interfaces and implementations for opening and managing client side HTTP connections.

See:
          Description

Interface Summary
ClientConnectionManager Deprecated. (4.3) replaced by HttpClientConnectionManager.
ClientConnectionManagerFactory Deprecated. (4.3) replaced by HttpClientConnectionManager.
ClientConnectionOperator Deprecated. (4.3) replaced by HttpClientConnectionManager.
ClientConnectionRequest Deprecated. (4.3) replaced by ConnectionRequest.
ConnectionKeepAliveStrategy Interface for deciding how long a connection can remain idle before being reused.
ConnectionReleaseTrigger Interface for releasing a connection.
ConnectionRequest Encapsulates a request for a HttpClientConnection.
DnsResolver Users may implement this interface to override the normal DNS lookup offered by the OS.
EofSensorWatcher A watcher for EofSensorInputStream.
HttpClientConnectionManager Represents a manager of persistent client connections.
HttpConnectionFactory<T extends HttpConnection> Generic HttpConnection factory.
HttpRoutedConnection Deprecated. (4.3) replaced by HttpClientConnectionManager.
ManagedClientConnection Deprecated. (4.3) replaced by HttpClientConnectionManager.
OperatedClientConnection Deprecated. (4.3) replaced by HttpClientConnectionManager.
SchemePortResolver Default port resolver for protocol schemes.
SocketClientConnection Extended interface that exposes Socket bind method and SSL session details.
 

Class Summary
BasicEofSensorWatcher Deprecated. (4.3) do not use.
BasicManagedEntity Deprecated. (4.3) do not use.
EofSensorInputStream A stream wrapper that triggers actions on close() and EOF.
HttpInetSocketAddress Deprecated. (4.3)
MultihomePlainSocketFactory Deprecated. (4.1) Do not use.
 

Exception Summary
ConnectionPoolTimeoutException A timeout while waiting for an available connection from a connection manager.
ConnectTimeoutException A timeout while connecting to an HTTP server or waiting for an available connection from an HttpConnectionManager.
HttpHostConnectException A ConnectException that specifies the HttpHost that was being connected to.
 

Package org.apache.http.conn Description

The client-side connection management and handling API that provides interfaces and implementations for opening and managing client side HTTP connections.

The lowest layer of connection handling is comprised of OperatedClientConnection and ClientConnectionOperator. The connection interface extends the core HttpClientConnection by operations to set and update a socket. An operator encapsulates the logic to open and layer sockets, typically using a SocketFactory. The socket factory for a protocol Scheme such as "http" or "https" can be looked up in a SchemeRegistry. Applications without a need for sophisticated connection management can use this layer directly.

On top of that lies the connection management layer. A ClientConnectionManager internally manages operated connections, but hands out instances of ManagedClientConnection. This interface abstracts from the underlying socket operations and provides convenient methods for opening and updating sockets in order to establish a route. The operator is encapsulated by the connection manager and called automatically.

Connections obtained from a manager have to be returned after use. This can be triggered on various levels, either by releasing the connection directly, or by calling a method on an entity received from the connection, or by closing the stream from which that entity is being read.

Connection managers will try to keep returned connections alive in order to re-use them for subsequent requests along the same route. The managed connection interface and all triggers for connection release provide methods to enable or disable this behavior.



Copyright © 1999-2013 The Apache Software Foundation. All Rights Reserved.