Top Fields Constructors Methods
org.apache.http.impl.conn

pack-priv Class ManagedClientConnectionImpl

extends Object
implements ManagedClientConnection
Class Inheritance
All Implemented Interfaces
org.apache.http.conn.ManagedClientConnection, org.apache.http.conn.ConnectionReleaseTrigger, org.apache.http.conn.ManagedHttpClientConnection, org.apache.http.HttpInetConnection, org.apache.http.HttpConnection, java.io.Closeable, java.lang.AutoCloseable, org.apache.http.HttpClientConnection, org.apache.http.conn.HttpRoutedConnection
Annotations
@Deprecated
Imports
java.io.IOException, .InterruptedIOException, java.net.InetAddress, .Socket, java.util.concurrent.TimeUnit, javax.net.ssl.SSLSession, .SSLSocket, org.apache.http.HttpConnectionMetrics, .HttpEntityEnclosingRequest, .HttpException, .HttpHost, .HttpRequest, .HttpResponse, org.apache.http.conn.ClientConnectionManager, .ClientConnectionOperator, .ManagedClientConnection, .OperatedClientConnection, org.apache.http.conn.routing.HttpRoute, .RouteTracker, org.apache.http.params.HttpParams, org.apache.http.protocol.HttpContext, org.apache.http.util.Args, .Asserts

Deprecated

(4.3) use ManagedHttpClientConnectionFactory.

Since
4.2

Field Summary

Modifier and TypeField and Description
private volatile long
private final ClientConnectionManager
manager

Deprecated as a consequence of ClientConnectionManager being deprecated.
private final ClientConnectionOperator
operator

Deprecated as a consequence of ClientConnectionOperator being deprecated.
private volatile HttpPoolEntry
poolEntry

Deprecated as a consequence of HttpPoolEntry being deprecated.
private volatile boolean

Constructor Summary

AccessConstructor and Description
pack-priv
ManagedClientConnectionImpl(final ClientConnectionManager manager, final ClientConnectionOperator operator, final HttpPoolEntry entry)

Deprecated as a consequence of ClientConnectionManager, ClientConnectionOperator and HttpPoolEntry being deprecated.

Method Summary

Modifier and TypeMethod and Description
public void
abortConnection()

Implements org.apache.http.conn.ConnectionReleaseTrigger.abortConnection.

Releases the connection without the option of keep-alive.
public void
bind(final Socket
the socket to bind the connection to.
socket
)

Implements org.apache.http.conn.ManagedHttpClientConnection.bind.

Binds this connection to the given socket.
public void
close()

Implements org.apache.http.HttpConnection.close.

Closes this connection gracefully.
pack-priv HttpPoolEntry
detach()

Deprecated as a consequence of HttpPoolEntry being deprecated.
private OperatedClientConnection
ensureConnection()

Deprecated as a consequence of OperatedClientConnection being deprecated.
private HttpPoolEntry
ensurePoolEntry()

Deprecated as a consequence of HttpPoolEntry being deprecated.
public void
flush()

Implements org.apache.http.HttpClientConnection.flush.

Writes out all pending buffered data over the open connection.
public Object
getAttribute(final String id)

private OperatedClientConnection
getConnection()

Deprecated as a consequence of OperatedClientConnection being deprecated.
public String
getId()

Implements org.apache.http.conn.ManagedHttpClientConnection.getId.

Returns connection ID which is expected to be unique for the life span of the connection manager.
public InetAddress
public int
public ClientConnectionManager
getManager()

Deprecated as a consequence of ClientConnectionManager being deprecated.
public HttpConnectionMetrics
getMetrics()

Implements org.apache.http.HttpConnection.getMetrics.

Returns a collection of connection metrics.
pack-priv HttpPoolEntry
getPoolEntry()

Deprecated as a consequence of HttpPoolEntry being deprecated.
public InetAddress
public int
public HttpRoute
getRoute()

Implements org.apache.http.conn.ManagedClientConnection.getRoute.

Obtains the current route of this connection.
public Socket
getSocket()

Implements org.apache.http.conn.ManagedHttpClientConnection.getSocket.

Returns the underlying socket.
public int
getSocketTimeout()

Implements org.apache.http.HttpConnection.getSocketTimeout.

Returns the socket timeout value.
public SSLSession
getSSLSession()

Implements org.apache.http.conn.ManagedClientConnection.getSSLSession.

Obtains the SSL session of the underlying connection, if any.
public Object
getState()

Implements org.apache.http.conn.ManagedClientConnection.getState.

Returns the state object associated with this connection.
public boolean
isMarkedReusable()

Implements org.apache.http.conn.ManagedClientConnection.isMarkedReusable.

Indicates whether this connection is in a reusable communication state.
public boolean
isOpen()

Implements org.apache.http.HttpConnection.isOpen.

Checks if this connection is open.
public boolean
isResponseAvailable(final int
the maximum time in milliseconds to wait for data
timeout
)

Implements org.apache.http.HttpClientConnection.isResponseAvailable.

Checks if response data is available from the connection.
public boolean
isSecure()

Implements org.apache.http.conn.ManagedClientConnection.isSecure.

Indicates whether this connection is secure.
public boolean
isStale()

Implements org.apache.http.HttpConnection.isStale.

Checks whether this connection has gone down.
public void
layerProtocol(final HttpContext
the context for layering on top of this connection
context
,
final HttpParams
the parameters for layering on top of this connection
params
)

Implements org.apache.http.conn.ManagedClientConnection.layerProtocol.

Deprecated as a consequence of HttpParams being deprecated.
Layers a new protocol on top of a tunnelled connection.
public void
markReusable()

Implements org.apache.http.conn.ManagedClientConnection.markReusable.

Marks this connection as being in a reusable communication state.
public void
open(final HttpRoute
the route along which to open. It will be opened to the first proxy if present, or directly to the target.
route
,
final HttpContext
the context for opening this connection
context
,
final HttpParams
the parameters for opening this connection
params
)

Implements org.apache.http.conn.ManagedClientConnection.open.

Deprecated as a consequence of HttpParams being deprecated.
Opens this connection according to the given route.
public void
receiveResponseEntity(final HttpResponse
the response to attach the entity to
response
)

Implements org.apache.http.HttpClientConnection.receiveResponseEntity.

Receives the next response entity available from this connection and attaches it to an existing HttpResponse object.
public HttpResponse
receiveResponseHeader()

Implements org.apache.http.HttpClientConnection.receiveResponseHeader.

Receives the request line and headers of the next response available from this connection.
public void
releaseConnection()

Implements org.apache.http.conn.ConnectionReleaseTrigger.releaseConnection.

Releases the connection with the option of keep-alive.
public Object
public void
sendRequestEntity(final HttpEntityEnclosingRequest
the request whose entity to send.
request
)

Implements org.apache.http.HttpClientConnection.sendRequestEntity.

Sends the request entity over the connection.
public void
sendRequestHeader(final HttpRequest
the request whose headers to send.
request
)

Implements org.apache.http.HttpClientConnection.sendRequestHeader.

Sends the request line and all headers over the connection.
public void
setAttribute(final String id, final Object obj)

public void
setIdleDuration(final long duration, final TimeUnit unit)

Implements org.apache.http.conn.ManagedClientConnection.setIdleDuration.

Sets the duration that this connection can remain idle before it is reused.
public void
setSocketTimeout(final int
timeout value in milliseconds
timeout
)

Implements org.apache.http.HttpConnection.setSocketTimeout.

Sets the socket timeout value.
public void
setState(final Object
The state object
state
)

Implements org.apache.http.conn.ManagedClientConnection.setState.

Assigns a state object to this connection.
public void
shutdown()

Implements org.apache.http.HttpConnection.shutdown.

Force-closes this connection.
public void
tunnelProxy(final 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 tunnelTarget to indicate an end-to-end tunnel.
next
,
final boolean
true if the connection should be considered secure, false otherwise
secure
,
final HttpParams
the parameters for tunnelling this connection
params
)

Implements org.apache.http.conn.ManagedClientConnection.tunnelProxy.

Deprecated as a consequence of HttpParams being deprecated.
Indicates that a tunnel to an intermediate proxy has been established.
public void
tunnelTarget(final boolean
true if the tunnel should be considered secure, false otherwise
secure
,
final HttpParams
the parameters for tunnelling this connection
params
)

Implements org.apache.http.conn.ManagedClientConnection.tunnelTarget.

Deprecated as a consequence of HttpParams being deprecated.
Indicates that a tunnel to the target has been established.
public void
unmarkReusable()

Implements org.apache.http.conn.ManagedClientConnection.unmarkReusable.

Marks this connection as not being in a reusable state.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

durationback to summary
private volatile long duration
managerback to summary
private final ClientConnectionManager manager

Deprecated

as a consequence of ClientConnectionManager being deprecated. See corresponding docs for further information.

operatorback to summary
private final ClientConnectionOperator operator

Deprecated

as a consequence of ClientConnectionOperator being deprecated. See corresponding docs for further information.

poolEntryback to summary
private volatile HttpPoolEntry poolEntry

Deprecated

as a consequence of HttpPoolEntry being deprecated. See corresponding docs for further information.

reusableback to summary
private volatile boolean reusable

Constructor Detail

ManagedClientConnectionImplback to summary
pack-priv ManagedClientConnectionImpl(final ClientConnectionManager manager, final ClientConnectionOperator operator, final HttpPoolEntry entry)

Deprecated

as a consequence of ClientConnectionManager, ClientConnectionOperator and HttpPoolEntry being deprecated. See corresponding docs for further information.

Method Detail

abortConnectionback to summary
public void abortConnection()

Implements org.apache.http.conn.ConnectionReleaseTrigger.abortConnection.

Doc from org.apache.http.conn.ConnectionReleaseTrigger.abortConnection.

Releases the connection without the option of keep-alive. This is a "hard" release that implies a shutdown of the connection. Use releaseConnection() for a graceful release.

Annotations
@Override
bindback to summary
public void bind(final Socket socket) throws IOException

Implements org.apache.http.conn.ManagedHttpClientConnection.bind.

Doc from org.apache.http.conn.ManagedHttpClientConnection.bind.

Binds this connection to the given socket. The connection is considered open if it is bound and the underlying socket is connection to a remote host.

Parameters
socket:Socket

the socket to bind the connection to.

Annotations
@Override
closeback to summary
public void close() throws IOException

Implements org.apache.http.HttpConnection.close.

Doc from org.apache.http.HttpConnection.close.

Closes this connection gracefully. This method will attempt to flush the internal output buffer prior to closing the underlying socket. This method MUST NOT be called from a different thread to force shutdown of the connection. Use shutdown instead.

Annotations
@Override
Exceptions
IOException:

Doc from java.io.Closeable.close.

if an I/O error occurs

detachback to summary
pack-priv HttpPoolEntry detach()

Deprecated

as a consequence of HttpPoolEntry being deprecated. See corresponding docs for further information.

ensureConnectionback to summary
private OperatedClientConnection ensureConnection()

Deprecated

as a consequence of OperatedClientConnection being deprecated. See corresponding docs for further information.

ensurePoolEntryback to summary
private HttpPoolEntry ensurePoolEntry()

Deprecated

as a consequence of HttpPoolEntry being deprecated. See corresponding docs for further information.

flushback to summary
public void flush() throws IOException

Implements org.apache.http.HttpClientConnection.flush.

Doc from org.apache.http.HttpClientConnection.flush.

Writes out all pending buffered data over the open connection.

Annotations
@Override
Exceptions
IOException:
in case of an I/O error
getAttributeback to summary
public Object getAttribute(final String id)
getConnectionback to summary
private OperatedClientConnection getConnection()

Deprecated

as a consequence of OperatedClientConnection being deprecated. See corresponding docs for further information.

getIdback to summary
public String getId()

Implements org.apache.http.conn.ManagedHttpClientConnection.getId.

Doc from org.apache.http.conn.ManagedHttpClientConnection.getId.

Returns connection ID which is expected to be unique for the life span of the connection manager.

Annotations
@Override
getLocalAddressback to summary
public InetAddress getLocalAddress()

Implements org.apache.http.HttpInetConnection.getLocalAddress.

Annotations
@Override
getLocalPortback to summary
public int getLocalPort()

Implements org.apache.http.HttpInetConnection.getLocalPort.

Annotations
@Override
getManagerback to summary
public ClientConnectionManager getManager()

Deprecated

as a consequence of ClientConnectionManager being deprecated. See corresponding docs for further information.

getMetricsback to summary
public HttpConnectionMetrics getMetrics()

Implements org.apache.http.HttpConnection.getMetrics.

Doc from org.apache.http.HttpConnection.getMetrics.

Returns a collection of connection metrics.

Returns:HttpConnectionMetrics

HttpConnectionMetrics

Annotations
@Override
getPoolEntryback to summary
pack-priv HttpPoolEntry getPoolEntry()

Deprecated

as a consequence of HttpPoolEntry being deprecated. See corresponding docs for further information.

getRemoteAddressback to summary
public InetAddress getRemoteAddress()

Implements org.apache.http.HttpInetConnection.getRemoteAddress.

Annotations
@Override
getRemotePortback to summary
public int getRemotePort()

Implements org.apache.http.HttpInetConnection.getRemotePort.

Annotations
@Override
getRouteback to summary
public HttpRoute getRoute()

Implements org.apache.http.conn.ManagedClientConnection.getRoute.

Doc from org.apache.http.conn.ManagedClientConnection.getRoute.

Obtains the current route of this connection.

Returns:HttpRoute

the route established so far, or null if not connected

Annotations
@Override
getSocketback to summary
public Socket getSocket()

Implements org.apache.http.conn.ManagedHttpClientConnection.getSocket.

Doc from org.apache.http.conn.ManagedHttpClientConnection.getSocket.

Returns the underlying socket.

Annotations
@Override
getSocketTimeoutback to summary
public int getSocketTimeout()

Implements org.apache.http.HttpConnection.getSocketTimeout.

Doc from org.apache.http.HttpConnection.getSocketTimeout.

Returns the socket timeout value.

Returns:int

positive value in milliseconds if a timeout is set, 0 if timeout is disabled or -1 if timeout is undefined.

Annotations
@Override
getSSLSessionback to summary
public SSLSession getSSLSession()

Implements org.apache.http.conn.ManagedClientConnection.getSSLSession.

Doc from org.apache.http.conn.ManagedClientConnection.getSSLSession.

Obtains the SSL session of the underlying connection, if any. If this connection is open, and the underlying socket is an SSLSocket, the SSL session of that socket is obtained. This is a potentially blocking operation.

Note

Whether the underlying socket is an SSL socket can not necessarily be determined via isSecure. Plain sockets may be considered secure, for example if they are connected to a known host in the same network segment. On the other hand, SSL sockets may be considered insecure, for example depending on the chosen cipher suite.

Returns:SSLSession

the underlying SSL session if available, null otherwise

Annotations
@Override
getStateback to summary
public Object getState()

Implements org.apache.http.conn.ManagedClientConnection.getState.

Doc from org.apache.http.conn.ManagedClientConnection.getState.

Returns the state object associated with this connection.

Returns:Object

The state object

Annotations
@Override
isMarkedReusableback to summary
public boolean isMarkedReusable()

Implements org.apache.http.conn.ManagedClientConnection.isMarkedReusable.

Doc from org.apache.http.conn.ManagedClientConnection.isMarkedReusable.

Indicates whether this connection is in a reusable communication state. See markReusable and unmarkReusable for details.

Returns:boolean

true if this connection is marked as being in a reusable communication state, false otherwise

Annotations
@Override
isOpenback to summary
public boolean isOpen()

Implements org.apache.http.HttpConnection.isOpen.

Doc from org.apache.http.HttpConnection.isOpen.

Checks if this connection is open.

Returns:boolean

true if it is open, false if it is closed.

Annotations
@Override
isResponseAvailableback to summary
public boolean isResponseAvailable(final int timeout) throws IOException

Implements org.apache.http.HttpClientConnection.isResponseAvailable.

Doc from org.apache.http.HttpClientConnection.isResponseAvailable.

Checks if response data is available from the connection. May wait for the specified time until some data becomes available. Note that some implementations may completely ignore the timeout parameter.

Parameters
timeout:int

the maximum time in milliseconds to wait for data

Returns:boolean

true if data is available; false if there was no data available even after waiting for timeout milliseconds.

Annotations
@Override
Exceptions
IOException:
if an error happens on the connection
isSecureback to summary
public boolean isSecure()

Implements org.apache.http.conn.ManagedClientConnection.isSecure.

Doc from org.apache.http.conn.ManagedClientConnection.isSecure.

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.

Returns:boolean

true if this connection is secure, false otherwise

Annotations
@Override
isStaleback to summary
public boolean isStale()

Implements org.apache.http.HttpConnection.isStale.

Doc from org.apache.http.HttpConnection.isStale.

Checks whether this connection has gone down. Network connections may get closed during some time of inactivity for several reasons. The next time a read is attempted on such a connection it will throw an IOException. This method tries to alleviate this inconvenience by trying to find out if a connection is still usable. Implementations may do that by attempting a read with a very small timeout. Thus this method may block for a small amount of time before returning a result. It is therefore an expensive operation.

Returns:boolean

true if attempts to use this connection are likely to succeed, or false if they are likely to fail and this connection should be closed

Annotations
@Override
layerProtocolback to summary
public void layerProtocol(final HttpContext context, final HttpParams params) throws IOException

Implements org.apache.http.conn.ManagedClientConnection.layerProtocol.

Doc from org.apache.http.conn.ManagedClientConnection.layerProtocol.

Deprecated

as a consequence of HttpParams being deprecated. See corresponding docs for further information.

Layers a new protocol on top of a 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.

Parameters
context:HttpContext

the context for layering on top of this connection

params:HttpParams

the parameters for layering on top of this connection

Annotations
@Override
Exceptions
IOException:
in case of a problem
markReusableback to summary
public void markReusable()

Implements org.apache.http.conn.ManagedClientConnection.markReusable.

Doc from org.apache.http.conn.ManagedClientConnection.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 route mismatch, the connection being closed, or other circumstances might prevent reuse.

Annotations
@Override
openback to summary
public void open(final HttpRoute route, final HttpContext context, final HttpParams params) throws IOException

Implements org.apache.http.conn.ManagedClientConnection.open.

Doc from org.apache.http.conn.ManagedClientConnection.open.

Deprecated

as a consequence of HttpParams being deprecated. See corresponding docs for further information.

Opens this connection according to the given route.

Parameters
route:HttpRoute

the route along which to open. It will be opened to the first proxy if present, or directly to the target.

context:HttpContext

the context for opening this connection

params:HttpParams

the parameters for opening this connection

Annotations
@Override
Exceptions
IOException:
in case of a problem
receiveResponseEntityback to summary
public void receiveResponseEntity(final HttpResponse response) throws HttpException, IOException

Implements org.apache.http.HttpClientConnection.receiveResponseEntity.

Doc from org.apache.http.HttpClientConnection.receiveResponseEntity.

Receives the next response entity available from this connection and attaches it to an existing HttpResponse object.

Parameters
response:HttpResponse

the response to attach the entity to

Annotations
@Override
Exceptions
HttpException:
in case of HTTP protocol violation
IOException:
in case of an I/O error
receiveResponseHeaderback to summary
public HttpResponse receiveResponseHeader() throws HttpException, IOException

Implements org.apache.http.HttpClientConnection.receiveResponseHeader.

Doc from org.apache.http.HttpClientConnection.receiveResponseHeader.

Receives the request line and headers of the next response available from this connection. The caller should examine the HttpResponse object to find out if it should try to receive a response entity as well.

Returns:HttpResponse

a new HttpResponse object with status line and headers initialized.

Annotations
@Override
Exceptions
HttpException:
in case of HTTP protocol violation
IOException:
in case of an I/O error
releaseConnectionback to summary
public void releaseConnection()

Implements org.apache.http.conn.ConnectionReleaseTrigger.releaseConnection.

Doc from org.apache.http.conn.ConnectionReleaseTrigger.releaseConnection.

Releases the connection with the option of keep-alive. This is a "graceful" release and may cause IO operations for consuming the remainder of a response entity. Use abortConnection for a hard release. The connection may be reused as specified by the duration.

Annotations
@Override
removeAttributeback to summary
public Object removeAttribute(final String id)
sendRequestEntityback to summary
public void sendRequestEntity(final HttpEntityEnclosingRequest request) throws HttpException, IOException

Implements org.apache.http.HttpClientConnection.sendRequestEntity.

Doc from org.apache.http.HttpClientConnection.sendRequestEntity.

Sends the request entity over the connection.

Parameters
request:HttpEntityEnclosingRequest

the request whose entity to send.

Annotations
@Override
Exceptions
HttpException:
in case of HTTP protocol violation
IOException:
in case of an I/O error
sendRequestHeaderback to summary
public void sendRequestHeader(final HttpRequest request) throws HttpException, IOException

Implements org.apache.http.HttpClientConnection.sendRequestHeader.

Doc from org.apache.http.HttpClientConnection.sendRequestHeader.

Sends the request line and all headers over the connection.

Parameters
request:HttpRequest

the request whose headers to send.

Annotations
@Override
Exceptions
HttpException:
in case of HTTP protocol violation
IOException:
in case of an I/O error
setAttributeback to summary
public void setAttribute(final String id, final Object obj)
setIdleDurationback to summary
public void setIdleDuration(final long duration, final TimeUnit unit)

Implements org.apache.http.conn.ManagedClientConnection.setIdleDuration.

Doc from org.apache.http.conn.ManagedClientConnection.setIdleDuration.

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.

Annotations
@Override
setSocketTimeoutback to summary
public void setSocketTimeout(final int timeout)

Implements org.apache.http.HttpConnection.setSocketTimeout.

Doc from org.apache.http.HttpConnection.setSocketTimeout.

Sets the socket timeout value.

Parameters
timeout:int

timeout value in milliseconds

Annotations
@Override
setStateback to summary
public void setState(final Object state)

Implements org.apache.http.conn.ManagedClientConnection.setState.

Doc from org.apache.http.conn.ManagedClientConnection.setState.

Assigns a state object to this connection. Connection managers may make use of the connection state when allocating persistent connections.

Parameters
state:Object

The state object

Annotations
@Override
shutdownback to summary
public void shutdown() throws IOException

Implements org.apache.http.HttpConnection.shutdown.

Doc from org.apache.http.HttpConnection.shutdown.

Force-closes this connection. This is the only method of a connection which may be called from a different thread to terminate the connection. This method will not attempt to flush the transmitter's internal buffer prior to closing the underlying socket.

Annotations
@Override
tunnelProxyback to summary
public void tunnelProxy(final HttpHost next, final boolean secure, final HttpParams params) throws IOException

Implements org.apache.http.conn.ManagedClientConnection.tunnelProxy.

Doc from org.apache.http.conn.ManagedClientConnection.tunnelProxy.

Deprecated

as a consequence of HttpParams being deprecated. See corresponding docs for further information.

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.

Parameters
next: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 tunnelTarget to indicate an end-to-end tunnel.

secure:boolean

true if the connection should be considered secure, false otherwise

params:HttpParams

the parameters for tunnelling this connection

Annotations
@Override
Exceptions
IOException:
in case of a problem
tunnelTargetback to summary
public void tunnelTarget(final boolean secure, final HttpParams params) throws IOException

Implements org.apache.http.conn.ManagedClientConnection.tunnelTarget.

Doc from org.apache.http.conn.ManagedClientConnection.tunnelTarget.

Deprecated

as a consequence of HttpParams being deprecated. See corresponding docs for further information.

Indicates that a tunnel to the target has been established. The route is the one previously passed to open. Subsequently, layerProtocol can be called to layer the TLS/SSL protocol on top of the tunnelled connection.

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.

Parameters
secure:boolean

true if the tunnel should be considered secure, false otherwise

params:HttpParams

the parameters for tunnelling this connection

Annotations
@Override
Exceptions
IOException:
in case of a problem
unmarkReusableback to summary
public void unmarkReusable()

Implements org.apache.http.conn.ManagedClientConnection.unmarkReusable.

Doc from org.apache.http.conn.ManagedClientConnection.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 reuse strategy.

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 markReusable.

Annotations
@Override