|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.impl.conn.AbstractPoolEntry
public abstract class AbstractPoolEntry
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
it's 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.
Field Summary | |
---|---|
protected OperatedClientConnection |
connection
The underlying connection being pooled or used. |
protected HttpRoute |
plannedRoute
The route for which this entry gets allocated. |
protected RouteTracker |
tracker
The tracked route, or null before tracking starts. |
Constructor Summary | |
---|---|
protected |
AbstractPoolEntry(OperatedClientConnection occ,
HttpRoute route)
Creates a new pool entry. |
Method Summary | |
---|---|
void |
closing()
Tracks close or shutdown of the connection. |
protected abstract ClientConnectionOperator |
getOperator()
Obtains the connection operator . |
void |
layerProtocol(org.apache.http.protocol.HttpContext context,
org.apache.http.params.HttpParams params)
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)
Opens the underlying connection. |
void |
tunnelProxy(org.apache.http.HttpHost next,
boolean secure,
org.apache.http.params.HttpParams params)
Tracks tunnelling of the connection to a chained proxy. |
void |
tunnelTarget(boolean secure,
org.apache.http.params.HttpParams params)
Tracks tunnelling of the connection to the target. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected OperatedClientConnection connection
protected HttpRoute plannedRoute
protected RouteTracker tracker
null
before tracking starts.
Constructor Detail |
---|
protected AbstractPoolEntry(OperatedClientConnection occ, HttpRoute route)
occ
- the underlying connection for this entryroute
- the planned route for the connection,
or null
Method Detail |
---|
protected abstract ClientConnectionOperator getOperator()
operator
.
public void open(HttpRoute route, org.apache.http.protocol.HttpContext context, org.apache.http.params.HttpParams params) throws java.io.IOException
route
- the route along which to open the connectioncontext
- the context for opening the connectionparams
- the parameters for opening the connection
java.io.IOException
- in case of a problempublic void tunnelTarget(boolean secure, org.apache.http.params.HttpParams params) throws java.io.IOException
secure
- true
if the tunnel should be
considered secure, false
otherwiseparams
- the parameters for tunnelling the connection
java.io.IOException
- in case of a problempublic void tunnelProxy(org.apache.http.HttpHost next, boolean secure, org.apache.http.params.HttpParams params) throws java.io.IOException
next
- the proxy to which the tunnel was established.
See ManagedClientConnection.tunnelProxy
for details.secure
- true
if the tunnel should be
considered secure, false
otherwiseparams
- the parameters for tunnelling the connection
java.io.IOException
- in case of a problempublic void layerProtocol(org.apache.http.protocol.HttpContext context, org.apache.http.params.HttpParams params) throws java.io.IOException
context
- the context for layeringparams
- the parameters for layering
java.io.IOException
- in case of a problempublic void closing()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |