@Deprecated public abstract class AbstractPooledConnAdapter extends AbstractClientConnAdapter
entries to
managed
client connections.
The connection in the pool entry is used to initialize the base class.
In addition, methods to establish a route are delegated to the
pool entry. shutdown and close
will clear the tracked route in the pool entry and call the
respective method of the wrapped connection.| 限定符和类型 | 字段和说明 |
|---|---|
protected AbstractPoolEntry |
poolEntry
已过时。
The wrapped pool entry.
|
RESERVED_PREFIX| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractPooledConnAdapter(ClientConnectionManager manager,
AbstractPoolEntry entry)
已过时。
Creates a new connection adapter.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
assertAttached()
已过时。
(4.1) use
assertValid(AbstractPoolEntry) |
protected void |
assertValid(AbstractPoolEntry entry)
已过时。
Asserts that there is a valid pool entry.
|
void |
close()
已过时。
Closes this connection gracefully.
|
protected void |
detach()
已过时。
Detaches this adapter from the wrapped connection.
|
protected AbstractPoolEntry |
getPoolEntry()
已过时。
(4.0.1)
|
HttpRoute |
getRoute()
已过时。
Obtains the current route of this connection.
|
java.lang.Object |
getState()
已过时。
Returns the state object associated with this connection.
|
void |
layerProtocol(HttpContext context,
HttpParams params)
已过时。
Layers a new protocol on top of a
tunnelled
connection. |
void |
open(HttpRoute route,
HttpContext context,
HttpParams params)
已过时。
Opens this connection according to the given route.
|
void |
setState(java.lang.Object state)
已过时。
Assigns a state object to this connection.
|
void |
shutdown()
已过时。
Force-closes this connection.
|
void |
tunnelProxy(HttpHost next,
boolean secure,
HttpParams params)
已过时。
Indicates that a tunnel to an intermediate proxy has been established.
|
void |
tunnelTarget(boolean secure,
HttpParams params)
已过时。
Indicates that a tunnel to the target has been established.
|
abortConnection, assertNotAborted, assertValid, flush, getAttribute, getLocalAddress, getLocalPort, getManager, getMetrics, getRemoteAddress, getRemotePort, getSocketTimeout, getSSLSession, getWrappedConnection, isMarkedReusable, isOpen, isReleased, isResponseAvailable, isSecure, isStale, markReusable, receiveResponseEntity, receiveResponseHeader, releaseConnection, removeAttribute, sendRequestEntity, sendRequestHeader, setAttribute, setIdleDuration, setSocketTimeout, unmarkReusableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbind, getId, getSocketprotected volatile AbstractPoolEntry poolEntry
protected AbstractPooledConnAdapter(ClientConnectionManager manager, AbstractPoolEntry entry)
manager - the connection managerentry - the pool entry for the connection being wrappedprotected AbstractPoolEntry getPoolEntry()
null if detachedprotected void assertValid(AbstractPoolEntry entry)
ConnectionShutdownException - if there is no pool entry
or connection has been abortedAbstractClientConnAdapter.assertValid(OperatedClientConnection)protected final void assertAttached()
assertValid(AbstractPoolEntry)protected void detach()
detach 在类中 AbstractClientConnAdapterpublic HttpRoute getRoute()
ManagedClientConnectionnull if not connectedpublic void open(HttpRoute route, HttpContext context, HttpParams params) throws java.io.IOException
ManagedClientConnectionroute - the route along which to open. It will be opened to
the first proxy if present, or directly to the target.context - the context for opening this connectionparams - the parameters for opening this connectionjava.io.IOException - in case of a problempublic void tunnelTarget(boolean secure,
HttpParams params)
throws java.io.IOException
ManagedClientConnectionopen.
Subsequently, layerProtocol can be called
to layer the TLS/SSL protocol on top of the tunnelled connection.
secure - true if the tunnel should be considered
secure, false otherwiseparams - the parameters for tunnelling this connectionjava.io.IOException - in case of a problempublic void tunnelProxy(HttpHost next, boolean secure, HttpParams params) throws java.io.IOException
ManagedClientConnectionManagedClientConnection.tunnelTarget(boolean, depends.org.apache.http.params.HttpParams).next - the proxy to which the tunnel was established.
This is not the proxy through which
the tunnel was established, but the new end point
of the tunnel. The tunnel does not yet
reach to the target, use ManagedClientConnection.tunnelTarget(boolean, depends.org.apache.http.params.HttpParams)
to indicate an end-to-end tunnel.secure - true if the connection should be
considered secure, false otherwiseparams - the parameters for tunnelling this connectionjava.io.IOException - in case of a problempublic void layerProtocol(HttpContext context, HttpParams params) throws java.io.IOException
ManagedClientConnectiontunnelled
connection. This is typically used to create a TLS/SSL connection
through a proxy.
The route is the one previously passed to open.
It is not guaranteed that the layered connection is
secure.context - the context for layering on top of this connectionparams - the parameters for layering on top of this connectionjava.io.IOException - in case of a problempublic void close()
throws java.io.IOException
HttpConnectionshutdown instead.java.io.IOExceptionpublic void shutdown()
throws java.io.IOException
HttpConnectionjava.io.IOExceptionpublic java.lang.Object getState()
ManagedClientConnectionpublic void setState(java.lang.Object state)
ManagedClientConnectionstate - The state object