Top Description Fields Constructors Methods
org.apache.http.impl.conn

public abstract Class AbstractPoolEntry

extends Object
Class Inheritance
Known Direct Subclasses
org.apache.http.impl.conn.SingleClientConnManager.PoolEntry, org.apache.http.impl.conn.tsccm.BasicPoolEntry
Annotations
@Deprecated
Imports
java.io.IOException, .InterruptedIOException, org.apache.http.HttpHost, org.apache.http.conn.ClientConnectionOperator, .OperatedClientConnection, org.apache.http.conn.routing.HttpRoute, .RouteTracker, org.apache.http.params.HttpParams, org.apache.http.protocol.HttpContext, org.apache.http.util.Args, .Asserts

Deprecated

(4.2) do not use

A pool entry for use by connection manager implementations. Pool entries work in conjunction with an adapter. The adapter is handed out to applications that obtain a connection. The pool entry stores the underlying connection and tracks the route established. The adapter delegates methods for establishing the route to its pool entry.

If the managed connections is released or revoked, the adapter gets disconnected, but the pool entry still contains the underlying connection and the established route.

Since
4.0

Field Summary

Modifier and TypeField and Description
protected final OperatedClientConnection
connection

The underlying connection being pooled or used.

protected final ClientConnectionOperator
connOperator

The connection operator.

protected volatile HttpRoute
route

The route for which this entry gets allocated.

protected volatile Object
state

Connection state object

protected volatile RouteTracker
tracker

The tracked route, or null before tracking starts.

Constructor Summary

AccessConstructor and Description
protected
AbstractPoolEntry(final ClientConnectionOperator
the Connection Operator for this entry
connOperator
,
final HttpRoute
the planned route for the connection, or null
route
)

Deprecated as a consequence of ClientConnectionOperator being deprecated.
Creates a new pool entry.

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

The state object
getState
()

Returns the state object associated with this pool entry.

public void
layerProtocol(final HttpContext
the context for layering
context
,
final HttpParams
the parameters for layering
params
)

Deprecated as a consequence of HttpParams being deprecated.
Layers a protocol on top of an established tunnel.
public void
open(final HttpRoute
the route along which to open the connection
route
,
final HttpContext
the context for opening the connection
context
,
final HttpParams
the parameters for opening the connection
params
)

Deprecated as a consequence of HttpParams being deprecated.
Opens the underlying connection.
public void
setState(final Object
The state object
state
)

Assigns a state object to this pool entry.

protected void
shutdownEntry()

Shuts down the entry.

public void
tunnelProxy(final HttpHost
the proxy to which the tunnel was established. See ManagedClientConnection.tunnelProxy for details.
next
,
final boolean
true if the tunnel should be considered secure, false otherwise
secure
,
final HttpParams
the parameters for tunnelling the connection
params
)

Deprecated as a consequence of HttpParams being deprecated.
Tracks tunnelling of the connection to a chained proxy.
public void
tunnelTarget(final boolean
true if the tunnel should be considered secure, false otherwise
secure
,
final HttpParams
the parameters for tunnelling the connection
params
)

Deprecated as a consequence of HttpParams being deprecated.
Tracks tunnelling of the connection to the target.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

connectionback to summary
protected final OperatedClientConnection connection

Deprecated

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

The underlying connection being pooled or used.

connOperatorback to summary
protected final ClientConnectionOperator connOperator

Deprecated

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

The connection operator.

routeback to summary
protected volatile HttpRoute route

The route for which this entry gets allocated.

stateback to summary
protected volatile Object state

Connection state object

trackerback to summary
protected volatile RouteTracker tracker

The tracked route, or null before tracking starts.

Constructor Detail

AbstractPoolEntryback to summary
protected AbstractPoolEntry(final ClientConnectionOperator connOperator, final HttpRoute route)

Deprecated

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

Creates a new pool entry.

Parameters
connOperator:ClientConnectionOperator

the Connection Operator for this entry

route:HttpRoute

the planned route for the connection, or null

Method Detail

getStateback to summary
public Object getState()

Returns the state object associated with this pool entry.

Returns:Object

The state object

layerProtocolback to summary
public void layerProtocol(final HttpContext context, final HttpParams params) throws IOException

Deprecated

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

Layers a protocol on top of an established tunnel.

Parameters
context:HttpContext

the context for layering

params:HttpParams

the parameters for layering

Exceptions
IOException:
in case of a problem
openback to summary
public void open(final HttpRoute route, final HttpContext context, final HttpParams params) throws IOException

Deprecated

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

Opens the underlying connection.

Parameters
route:HttpRoute

the route along which to open the connection

context:HttpContext

the context for opening the connection

params:HttpParams

the parameters for opening the connection

Exceptions
IOException:
in case of a problem
setStateback to summary
public void setState(final Object state)

Assigns a state object to this pool entry.

Parameters
state:Object

The state object

shutdownEntryback to summary
protected void shutdownEntry()

Shuts down the entry. If open(HttpRoute, HttpContext, HttpParams) is in progress, this will cause that open to possibly throw an IOException.

tunnelProxyback to summary
public void tunnelProxy(final HttpHost next, final boolean secure, final HttpParams params) throws IOException

Deprecated

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

Tracks tunnelling of the connection to a chained proxy. The tunnel has to be established outside by sending a CONNECT request to the previous proxy.

Parameters
next:HttpHost

the proxy to which the tunnel was established. See ManagedClientConnection.tunnelProxy for details.

secure:boolean

true if the tunnel should be considered secure, false otherwise

params:HttpParams

the parameters for tunnelling the connection

Exceptions
IOException:
in case of a problem
tunnelTargetback to summary
public void tunnelTarget(final boolean secure, final HttpParams params) throws IOException

Deprecated

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

Tracks tunnelling of the connection to the target. The tunnel has to be established outside by sending a CONNECT request to the (last) proxy.

Parameters
secure:boolean

true if the tunnel should be considered secure, false otherwise

params:HttpParams

the parameters for tunnelling the connection

Exceptions
IOException:
in case of a problem