@Internal public class DefaultManagedHttpClientConnection extends DefaultBHttpClientConnection implements ManagedHttpClientConnection, Identifiable
| Constructor and Description |
|---|
DefaultManagedHttpClientConnection(String id) |
DefaultManagedHttpClientConnection(String id,
CharsetDecoder charDecoder,
CharsetEncoder charEncoder,
Http1Config h1Config,
ContentLengthStrategy incomingContentStrategy,
ContentLengthStrategy outgoingContentStrategy,
HttpMessageWriterFactory<ClassicHttpRequest> requestWriterFactory,
HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory) |
DefaultManagedHttpClientConnection(String id,
CharsetDecoder charDecoder,
CharsetEncoder charEncoder,
Http1Config h1Config,
ContentLengthStrategy incomingContentStrategy,
ContentLengthStrategy outgoingContentStrategy,
ResponseOutOfOrderStrategy responseOutOfOrderStrategy,
HttpMessageWriterFactory<ClassicHttpRequest> requestWriterFactory,
HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Restores the connection from idle mode.
|
protected boolean |
awaitInput(Timeout arg0) |
void |
bind(Socket socket)
Binds this connection to the given socket.
|
void |
bind(SocketHolder socketHolder) |
void |
bind(SSLSocket sslSocket,
Socket socket)
Binds this connection to the SSL given socket and the underlying network
socket.
|
void |
close() |
void |
close(CloseMode closeMode) |
protected InputStream |
createContentInputStream(long arg0,
SessionInputBuffer arg1,
InputStream arg2) |
protected OutputStream |
createContentOutputStream(long arg0,
SessionOutputBuffer arg1,
OutputStream arg2,
Supplier<List<? extends Header>> arg3) |
protected SocketHolder |
ensureOpen() |
String |
getId() |
Socket |
getSocket()
Returns the underlying socket.
|
protected SocketHolder |
getSocketHolder() |
SSLSession |
getSSLSession()
Obtains the SSL session of the underlying connection, if any.
|
protected void |
incrementRequestCount() |
protected void |
incrementResponseCount() |
protected void |
onRequestSubmitted(ClassicHttpRequest request) |
protected void |
onResponseReceived(ClassicHttpResponse response) |
void |
passivate()
Puts the connection into idle mode.
|
void |
setSocketTimeout(Timeout timeout) |
isConsistent, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader, terminateRequestclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisConsistent, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader, terminateRequestflush, isDataAvailable, isStalegetEndpointDetails, getLocalAddress, getProtocolVersion, getRemoteAddress, isOpengetSocketTimeoutpublic DefaultManagedHttpClientConnection(String id, CharsetDecoder charDecoder, CharsetEncoder charEncoder, Http1Config h1Config, ContentLengthStrategy incomingContentStrategy, ContentLengthStrategy outgoingContentStrategy, ResponseOutOfOrderStrategy responseOutOfOrderStrategy, HttpMessageWriterFactory<ClassicHttpRequest> requestWriterFactory, HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory)
public DefaultManagedHttpClientConnection(String id, CharsetDecoder charDecoder, CharsetEncoder charEncoder, Http1Config h1Config, ContentLengthStrategy incomingContentStrategy, ContentLengthStrategy outgoingContentStrategy, HttpMessageWriterFactory<ClassicHttpRequest> requestWriterFactory, HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory)
public DefaultManagedHttpClientConnection(String id)
public String getId()
getId in interface Identifiablepublic void bind(SocketHolder socketHolder) throws IOException
IOExceptionpublic Socket getSocket()
ManagedHttpClientConnectiongetSocket in interface ManagedHttpClientConnectionpublic SSLSession getSSLSession()
ManagedHttpClientConnectionSSLSocket, the SSL session of
that socket is obtained. This is a potentially blocking operation.getSSLSession in interface ManagedHttpClientConnectiongetSSLSession in interface HttpConnectiongetSSLSession in class DefaultBHttpClientConnectionnull otherwisepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface HttpConnectionclose in class DefaultBHttpClientConnectionIOExceptionpublic void setSocketTimeout(Timeout timeout)
setSocketTimeout in interface SocketModalCloseablesetSocketTimeout in class DefaultBHttpClientConnectionpublic void close(CloseMode closeMode)
close in interface ModalCloseableclose in class DefaultBHttpClientConnectionpublic void bind(Socket socket) throws IOException
ManagedHttpClientConnectionbind in interface ManagedHttpClientConnectionbind in class DefaultBHttpClientConnectionsocket - the socket to bind the connection to.IOExceptionpublic void bind(SSLSocket sslSocket, Socket socket) throws IOException
ManagedHttpClientConnectionbind in interface ManagedHttpClientConnectionbind in class DefaultBHttpClientConnectionsslSocket - the SSL socket to bind the connection to.socket - the underlying network socket of the SSL socket.IOExceptionprotected void onResponseReceived(ClassicHttpResponse response)
onResponseReceived in class DefaultBHttpClientConnectionprotected void onRequestSubmitted(ClassicHttpRequest request)
onRequestSubmitted in class DefaultBHttpClientConnectionpublic void passivate()
ManagedHttpClientConnectionpassivate in interface ManagedHttpClientConnectionpublic void activate()
ManagedHttpClientConnectionactivate in interface ManagedHttpClientConnectionprotected SocketHolder ensureOpen() throws IOException
IOExceptionprotected SocketHolder getSocketHolder()
protected OutputStream createContentOutputStream(long arg0, SessionOutputBuffer arg1, OutputStream arg2, Supplier<List<? extends Header>> arg3)
protected InputStream createContentInputStream(long arg0, SessionInputBuffer arg1, InputStream arg2)
protected boolean awaitInput(Timeout arg0) throws IOException
IOExceptionprotected void incrementRequestCount()
protected void incrementResponseCount()
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.