Package org.apache.http.impl.conn
Class AbstractPoolEntry
- java.lang.Object
-
- org.apache.http.impl.conn.AbstractPoolEntry
-
- Direct Known Subclasses:
BasicPoolEntry
,SingleClientConnManager.PoolEntry
@Deprecated public abstract class AbstractPoolEntry extends java.lang.Object
Deprecated.(4.2) do not useA pool entry for use by connection manager implementations. Pool entries work in conjunction with anadapter
. The adapter is handed out to applications that obtain a connection. The pool entry stores the underlying connection and tracks theroute
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
Fields Modifier and Type Field Description protected OperatedClientConnection
connection
Deprecated.The underlying connection being pooled or used.protected ClientConnectionOperator
connOperator
Deprecated.The connection operator.protected HttpRoute
route
Deprecated.The route for which this entry gets allocated.protected java.lang.Object
state
Deprecated.Connection state objectprotected RouteTracker
tracker
Deprecated.The tracked route, ornull
before tracking starts.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractPoolEntry(ClientConnectionOperator connOperator, HttpRoute route)
Deprecated.Creates a new pool entry.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Object
getState()
Deprecated.Returns the state object associated with this pool entry.void
layerProtocol(org.apache.http.protocol.HttpContext context, org.apache.http.params.HttpParams params)
Deprecated.Layers a protocol on top of an established tunnel.void
open(HttpRoute route, org.apache.http.protocol.HttpContext context, org.apache.http.params.HttpParams params)
Deprecated.Opens the underlying connection.void
setState(java.lang.Object state)
Deprecated.Assigns a state object to this pool entry.protected void
shutdownEntry()
Deprecated.Shuts down the entry.void
tunnelProxy(org.apache.http.HttpHost next, boolean secure, org.apache.http.params.HttpParams params)
Deprecated.Tracks tunnelling of the connection to a chained proxy.void
tunnelTarget(boolean secure, org.apache.http.params.HttpParams params)
Deprecated.Tracks tunnelling of the connection to the target.
-
-
-
Field Detail
-
connOperator
protected final ClientConnectionOperator connOperator
Deprecated.The connection operator.
-
connection
protected final OperatedClientConnection connection
Deprecated.The underlying connection being pooled or used.
-
route
protected volatile HttpRoute route
Deprecated.The route for which this entry gets allocated.
-
state
protected volatile java.lang.Object state
Deprecated.Connection state object
-
tracker
protected volatile RouteTracker tracker
Deprecated.The tracked route, ornull
before tracking starts.
-
-
Constructor Detail
-
AbstractPoolEntry
protected AbstractPoolEntry(ClientConnectionOperator connOperator, HttpRoute route)
Deprecated.Creates a new pool entry.- Parameters:
connOperator
- the Connection Operator for this entryroute
- the planned route for the connection, ornull
-
-
Method Detail
-
getState
public java.lang.Object getState()
Deprecated.Returns the state object associated with this pool entry.- Returns:
- The state object
-
setState
public void setState(java.lang.Object state)
Deprecated.Assigns a state object to this pool entry.- Parameters:
state
- The state object
-
open
public void open(HttpRoute route, org.apache.http.protocol.HttpContext context, org.apache.http.params.HttpParams params) throws java.io.IOException
Deprecated.Opens the underlying connection.- Parameters:
route
- the route along which to open the connectioncontext
- the context for opening the connectionparams
- the parameters for opening the connection- Throws:
java.io.IOException
- in case of a problem
-
tunnelTarget
public void tunnelTarget(boolean secure, org.apache.http.params.HttpParams params) throws java.io.IOException
Deprecated.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
-true
if the tunnel should be considered secure,false
otherwiseparams
- the parameters for tunnelling the connection- Throws:
java.io.IOException
- in case of a problem
-
tunnelProxy
public void tunnelProxy(org.apache.http.HttpHost next, boolean secure, org.apache.http.params.HttpParams params) throws java.io.IOException
Deprecated.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
- the proxy to which the tunnel was established. SeeManagedClientConnection.tunnelProxy
for details.secure
-true
if the tunnel should be considered secure,false
otherwiseparams
- the parameters for tunnelling the connection- Throws:
java.io.IOException
- in case of a problem
-
layerProtocol
public void layerProtocol(org.apache.http.protocol.HttpContext context, org.apache.http.params.HttpParams params) throws java.io.IOException
Deprecated.Layers a protocol on top of an established tunnel.- Parameters:
context
- the context for layeringparams
- the parameters for layering- Throws:
java.io.IOException
- in case of a problem
-
shutdownEntry
protected void shutdownEntry()
Deprecated.Shuts down the entry. Ifopen(HttpRoute, HttpContext, HttpParams)
is in progress, this will cause that open to possibly throw anIOException
.
-
-