Top Description Methods
org.apache.hc.client5.http.io

public Interface ManagedHttpClientConnection

extends HttpClientConnection
Known Direct Implementers
org.apache.hc.client5.http.impl.io.DefaultManagedHttpClientConnection
Annotations
@Internal
Imports
java.io.IOException, java.net.Socket, javax.net.ssl.SSLSession, org.apache.hc.core5.annotation.Internal, org.apache.hc.core5.http.io.HttpClientConnection

Represents a managed connection whose state and life cycle is managed by a connection manager. This interface extends HttpClientConnection with methods to bind the connection to an arbitrary socket and to obtain SSL session details.
Since
4.3

Method Summary

Modifier and TypeMethod and Description
public void
activate()

Restores the connection from idle mode.

public void
bind(Socket
the socket to bind the connection to.
socket
)

Binds this connection to the given socket.

public Socket
getSocket()

Returns the underlying socket.

public SSLSession

Returns:

the underlying SSL session if available, null otherwise
getSSLSession
()

Redeclares org.apache.hc.core5.http.HttpConnection.getSSLSession.

Obtains the SSL session of the underlying connection, if any.
public void
passivate()

Puts the connection into idle mode.

Inherited from org.apache.hc.core5.http.io.HttpClientConnection:
isConsistentreceiveResponseEntityreceiveResponseHeadersendRequestEntitysendRequestHeaderterminateRequest

Method Detail

activateback to summary
public void activate()

Restores the connection from idle mode.

Since
5.0
bindback to summary
public void bind(Socket socket) throws IOException

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.

getSocketback to summary
public Socket getSocket()

Returns the underlying socket.

getSSLSessionback to summary
public SSLSession getSSLSession()

Redeclares org.apache.hc.core5.http.HttpConnection.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.

Returns:SSLSession

the underlying SSL session if available, null otherwise

Annotations
@Override
passivateback to summary
public void passivate()

Puts the connection into idle mode.

Since
5.0