Deprecated
(4.3) replaced by HttpClientConnectionManager.
| Modifier and Type | Method and Description |
|---|---|
| public HttpRoute | Returns: the route established so far, ornull if not connectedRedeclares org. |
| public SSLSession | Returns: the underlying SSL session if available,null otherwiseRedeclares org. |
| public Object | |
| public boolean | Returns: true if this connection is marked as being in
a reusable communication state,
false otherwiseIndicates whether this connection is in a reusable communication state. |
| public boolean | Returns: true if this connection is secure,
false otherwiseRedeclares org. |
| public void | layerProtocol(HttpContext
the context for layering on top of this connection context, HttpParams the parameters for layering on top of this connection params)
Deprecated
as a consequence of
Layers a new protocol on top of a HttpParams being deprecated.
tunnelled
connection.
|
| public void | |
| public void | open(HttpRoute
the route along which to open. It will be opened to
the first proxy if present, or directly to the target. route, HttpContext the context for opening this connection context, HttpParams the parameters for opening this connection params)
Deprecated
as a consequence of
Opens this connection according to the given route.
HttpParams being deprecated.
|
| public void | setIdleDuration(long duration, TimeUnit unit)
Sets the duration that this connection can remain idle before it is reused. |
| public void | |
| public void | tunnelProxy(HttpHost
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 next, boolean tunnelTarget
to indicate an end-to-end tunnel.true if the connection should be
considered secure, false otherwisethe parameters for tunnelling this connection params)
Deprecated
as a consequence of
Indicates that a tunnel to an intermediate proxy has been established.
HttpParams being deprecated.
|
| public void | tunnelTarget(boolean
true if the tunnel should be considered
secure, false otherwisethe parameters for tunnelling this connection params)
Deprecated
as a consequence of
Indicates that a tunnel to the target has been established.
HttpParams being deprecated.
|
| public void |
| getRoute | back to summary |
|---|---|
| public HttpRoute getRoute() Redeclares org. Obtains the current route of this connection. | |
| getSSLSession | back to summary |
|---|---|
| public SSLSession getSSLSession() Redeclares org. Obtains the SSL session of the underlying connection, if any.
If this connection is open, and the underlying socket is an
Note Whether the underlying socket is an SSL socket
can not necessarily be determined via
| |
| getState | back to summary |
|---|---|
| public Object getState() Returns the state object associated with this connection.
| |
| isMarkedReusable | back to summary |
|---|---|
| public boolean isMarkedReusable() Indicates whether this connection is in a reusable communication state.
See
| |
| isSecure | back to summary |
|---|---|
| public boolean isSecure() Redeclares org. Indicates whether this connection is secure. The return value is well-defined only while the connection is open. It may change even while the connection is open.
| |
| layerProtocol | back to summary |
|---|---|
| public void layerProtocol(HttpContext context, HttpParams params) throws IOException
Deprecated as a consequence of Layers a new protocol on top of a
| |
| markReusable | back to summary |
|---|---|
| public void markReusable() Marks this connection as being in a reusable communication state. The checkpoints for reuseable communication states (in the absence of pipelining) are before sending a request and after receiving the response in its entirety. The connection will automatically clear the checkpoint when used for communication. A call to this method indicates that the next checkpoint has been reached.
A reusable communication state is necessary but not sufficient
for the connection to be reused.
A | |
| open | back to summary |
|---|---|
| public void open(HttpRoute route, HttpContext context, HttpParams params) throws IOException
Deprecated as a consequence of Opens this connection according to the given route.
| |
| setIdleDuration | back to summary |
|---|---|
| public void setIdleDuration(long duration, TimeUnit unit) Sets the duration that this connection can remain idle before it is reused. The connection should not be used again if this time elapses. The idle duration must be reset after each request sent over this connection. The elapsed time starts counting when the connection is released, which is typically after the headers (and any response body, if present) is fully consumed. | |
| setState | back to summary |
|---|---|
| public void setState(Object state) Assigns a state object to this connection. Connection managers may make use of the connection state when allocating persistent connections.
| |
| tunnelProxy | back to summary |
|---|---|
| public void tunnelProxy(HttpHost next, boolean secure, HttpParams params) throws IOException
Deprecated as a consequence of Indicates that a tunnel to an intermediate proxy has been established.
This is used exclusively for so-called proxy chains, where
a request has to pass through multiple proxies before reaching the
target. In that case, all proxies but the last need to be tunnelled
when establishing the connection. Tunnelling of the last proxy to the
target is optional and would be indicated via
| |
| tunnelTarget | back to summary |
|---|---|
| public void tunnelTarget(boolean secure, HttpParams params) throws IOException
Deprecated as a consequence of Indicates that a tunnel to the target has been established.
The route is the one previously passed to Note In HttpClient 3, a call to the corresponding method would automatically trigger the layering of the TLS/SSL protocol. This is not the case anymore, you can establish a tunnel without layering a new protocol over the connection.
| |
| unmarkReusable | back to summary |
|---|---|
| public void unmarkReusable() Marks this connection as not being in a reusable state.
This can be used immediately before releasing this connection
to prevent its reuse. Reasons for preventing reuse include
error conditions and the evaluation of a
Note It is not necessary to call here before writing to
or reading from this connection. Communication attempts will
automatically unmark the state as non-reusable. It can then
be switched back using | |