public class DefaultManagedHttpClientConnection extends org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection implements ManagedHttpClientConnection, org.apache.hc.core5.util.Identifiable
ManagedHttpClientConnection implementation.| Constructor and Description |
|---|
DefaultManagedHttpClientConnection(String id) |
DefaultManagedHttpClientConnection(String id,
CharsetDecoder chardecoder,
CharsetEncoder charencoder,
org.apache.hc.core5.http.config.H1Config h1Config,
org.apache.hc.core5.http.ContentLengthStrategy incomingContentStrategy,
org.apache.hc.core5.http.ContentLengthStrategy outgoingContentStrategy,
org.apache.hc.core5.http.io.HttpMessageWriterFactory<org.apache.hc.core5.http.ClassicHttpRequest> requestWriterFactory,
org.apache.hc.core5.http.io.HttpMessageParserFactory<org.apache.hc.core5.http.ClassicHttpResponse> responseParserFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
awaitInput(int arg0) |
void |
bind(Socket socket)
Binds this connection to the given socket.
|
void |
bind(org.apache.hc.core5.http.impl.io.SocketHolder socketHolder) |
void |
close() |
protected InputStream |
createContentInputStream(long arg0,
org.apache.hc.core5.http.io.SessionInputBuffer arg1,
InputStream arg2) |
protected OutputStream |
createContentOutputStream(long arg0,
org.apache.hc.core5.http.io.SessionOutputBuffer arg1,
OutputStream arg2,
org.apache.hc.core5.function.Supplier<List<? extends org.apache.hc.core5.http.Header>> arg3) |
protected org.apache.hc.core5.http.impl.io.SocketHolder |
ensureOpen() |
String |
getId() |
Socket |
getSocket()
Returns the underlying socket.
|
protected org.apache.hc.core5.http.impl.io.SocketHolder |
getSocketHolder() |
SSLSession |
getSSLSession()
Obtains the SSL session of the underlying connection, if any.
|
protected void |
incrementRequestCount() |
protected void |
incrementResponseCount() |
protected void |
onRequestSubmitted(org.apache.hc.core5.http.ClassicHttpRequest request) |
protected void |
onResponseReceived(org.apache.hc.core5.http.ClassicHttpResponse response) |
void |
setSocketTimeout(int timeout) |
void |
shutdown(org.apache.hc.core5.io.ShutdownType shutdownType) |
isConsistent, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader, terminateRequestclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisConsistent, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader, terminateRequestpublic DefaultManagedHttpClientConnection(String id, CharsetDecoder chardecoder, CharsetEncoder charencoder, org.apache.hc.core5.http.config.H1Config h1Config, org.apache.hc.core5.http.ContentLengthStrategy incomingContentStrategy, org.apache.hc.core5.http.ContentLengthStrategy outgoingContentStrategy, org.apache.hc.core5.http.io.HttpMessageWriterFactory<org.apache.hc.core5.http.ClassicHttpRequest> requestWriterFactory, org.apache.hc.core5.http.io.HttpMessageParserFactory<org.apache.hc.core5.http.ClassicHttpResponse> responseParserFactory)
public DefaultManagedHttpClientConnection(String id)
public String getId()
getId in interface org.apache.hc.core5.util.Identifiablepublic void bind(org.apache.hc.core5.http.impl.io.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 org.apache.hc.core5.http.HttpConnectiongetSSLSession in class org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnectionnull otherwisepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface org.apache.hc.core5.http.HttpConnectionclose in class org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnectionIOExceptionpublic void setSocketTimeout(int timeout)
setSocketTimeout in interface org.apache.hc.core5.http.HttpConnectionsetSocketTimeout in class org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnectionpublic void shutdown(org.apache.hc.core5.io.ShutdownType shutdownType)
shutdown in interface org.apache.hc.core5.io.GracefullyCloseableshutdown in class org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnectionpublic void bind(Socket socket) throws IOException
ManagedHttpClientConnectionbind in interface ManagedHttpClientConnectionbind in class org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnectionsocket - the socket to bind the connection to.IOExceptionprotected void onResponseReceived(org.apache.hc.core5.http.ClassicHttpResponse response)
onResponseReceived in class org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnectionprotected void onRequestSubmitted(org.apache.hc.core5.http.ClassicHttpRequest request)
onRequestSubmitted in class org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnectionprotected org.apache.hc.core5.http.impl.io.SocketHolder ensureOpen()
throws IOException
IOExceptionprotected org.apache.hc.core5.http.impl.io.SocketHolder getSocketHolder()
protected OutputStream createContentOutputStream(long arg0, org.apache.hc.core5.http.io.SessionOutputBuffer arg1, OutputStream arg2, org.apache.hc.core5.function.Supplier<List<? extends org.apache.hc.core5.http.Header>> arg3)
protected InputStream createContentInputStream(long arg0, org.apache.hc.core5.http.io.SessionInputBuffer arg1, InputStream arg2)
protected boolean awaitInput(int arg0)
throws IOException
IOExceptionprotected void incrementRequestCount()
protected void incrementResponseCount()
Copyright © 1999–2017 The Apache Software Foundation. All rights reserved.