HttpClientConnectionManager.@Deprecated public interface ManagedClientConnection extends HttpClientConnection, HttpRoutedConnection, ManagedHttpClientConnection, ConnectionReleaseTrigger
| 限定符和类型 | 方法和说明 |
|---|---|
HttpRoute |
getRoute()
已过时。
Obtains the current route of this connection.
|
javax.net.ssl.SSLSession |
getSSLSession()
已过时。
Obtains the SSL session of the underlying connection, if any.
|
java.lang.Object |
getState()
已过时。
Returns the state object associated with this connection.
|
boolean |
isMarkedReusable()
已过时。
Indicates whether this connection is in a reusable communication state.
|
boolean |
isSecure()
已过时。
Indicates whether this connection is secure.
|
void |
layerProtocol(HttpContext context,
HttpParams params)
已过时。
Layers a new protocol on top of a
tunnelled
connection. |
void |
markReusable()
已过时。
Marks this connection as being in a reusable communication state.
|
void |
open(HttpRoute route,
HttpContext context,
HttpParams params)
已过时。
Opens this connection according to the given route.
|
void |
setIdleDuration(long duration,
java.util.concurrent.TimeUnit unit)
已过时。
Sets the duration that this connection can remain idle before it is
reused.
|
void |
setState(java.lang.Object state)
已过时。
Assigns a state object to 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.
|
void |
unmarkReusable()
已过时。
Marks this connection as not being in a reusable state.
|
bind, getId, getSocketflush, isResponseAvailable, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeadergetLocalAddress, getLocalPort, getRemoteAddress, getRemotePortclose, getMetrics, getSocketTimeout, isOpen, isStale, setSocketTimeout, shutdownabortConnection, releaseConnectionboolean isSecure()
isSecure 在接口中 HttpRoutedConnectiontrue if this connection is secure,
false otherwiseHttpRoute getRoute()
getRoute 在接口中 HttpRoutedConnectionnull if not connectedjavax.net.ssl.SSLSession getSSLSession()
SSLSocket, the SSL session of
that socket is obtained. This is a potentially blocking operation.
isSecure().
Plain sockets may be considered secure, for example if they are
connected to a known host in the same network segment.
On the extension hand, SSL sockets may be considered insecure,
for example depending on the chosen cipher suite.getSSLSession 在接口中 HttpRoutedConnectiongetSSLSession 在接口中 ManagedHttpClientConnectionnull otherwisevoid open(HttpRoute route, HttpContext context, HttpParams params) throws java.io.IOException
route - 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 problemvoid tunnelTarget(boolean secure,
HttpParams params)
throws java.io.IOException
open.
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 problemvoid tunnelProxy(HttpHost next, boolean secure, HttpParams params) throws java.io.IOException
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 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 problemvoid layerProtocol(HttpContext context, HttpParams params) throws java.io.IOException
tunnelled
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 problemvoid markReusable()
route mismatch, the connection being closed,
or extension circumstances might prevent reuse.void unmarkReusable()
reuse strategy.
markReusable.boolean isMarkedReusable()
markReusable and
unmarkReusable for details.true if this connection is marked as being in
a reusable communication state,
false otherwisevoid setState(java.lang.Object state)
state - The state objectjava.lang.Object getState()
void setIdleDuration(long duration,
java.util.concurrent.TimeUnit unit)