Class LoggingBHttpClientConnection
java.lang.Object
org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection
org.apache.hc.core5.testing.classic.LoggingBHttpClientConnection
- All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hc.core5.http.HttpConnection, org.apache.hc.core5.http.io.BHttpConnection, org.apache.hc.core5.http.io.HttpClientConnection, org.apache.hc.core5.http.SocketModalCloseable, org.apache.hc.core5.io.ModalCloseable, org.apache.hc.core5.util.Identifiable
public class LoggingBHttpClientConnection
extends org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection
implements org.apache.hc.core5.util.Identifiable
-
Constructor Summary
ConstructorsConstructorDescriptionLoggingBHttpClientConnection(org.apache.hc.core5.http.config.Http1Config http1Config) LoggingBHttpClientConnection(org.apache.hc.core5.http.config.Http1Config http1Config, CharsetDecoder charDecoder, CharsetEncoder charEncoder, 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) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanawaitInput(org.apache.hc.core5.util.Timeout arg0) voidvoidprotected voidbind(org.apache.hc.core5.http.impl.io.SocketHolder arg0) voidclose()voidclose(org.apache.hc.core5.io.CloseMode closeMode) protected InputStreamcreateContentInputStream(long arg0, org.apache.hc.core5.http.io.SessionInputBuffer arg1, InputStream arg2) protected OutputStreamcreateContentOutputStream(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.SocketHoldervoidflush()org.apache.hc.core5.http.EndpointDetailsgetId()org.apache.hc.core5.http.ProtocolVersionprotected org.apache.hc.core5.http.impl.io.SocketHolderorg.apache.hc.core5.util.Timeoutprotected voidprotected voidbooleanisDataAvailable(org.apache.hc.core5.util.Timeout arg0) booleanisOpen()booleanisStale()protected voidonRequestSubmitted(org.apache.hc.core5.http.ClassicHttpRequest request) protected voidonResponseReceived(org.apache.hc.core5.http.ClassicHttpResponse response) voidsetSocketTimeout(org.apache.hc.core5.util.Timeout arg0) toString()Methods inherited from class org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection
isConsistent, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader, terminateRequest, terminateRequestMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hc.core5.http.io.BHttpConnection
flush, isDataAvailable, isStaleMethods inherited from interface org.apache.hc.core5.http.HttpConnection
getEndpointDetails, getLocalAddress, getProtocolVersion, getRemoteAddress, getSSLSession, isIdle, isOpenMethods inherited from interface org.apache.hc.core5.http.SocketModalCloseable
getSocketTimeout, setSocketTimeout
-
Constructor Details
-
LoggingBHttpClientConnection
public LoggingBHttpClientConnection(org.apache.hc.core5.http.config.Http1Config http1Config, CharsetDecoder charDecoder, CharsetEncoder charEncoder, 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) -
LoggingBHttpClientConnection
public LoggingBHttpClientConnection(org.apache.hc.core5.http.config.Http1Config http1Config)
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceorg.apache.hc.core5.util.Identifiable
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.apache.hc.core5.http.HttpConnection- Throws:
IOException
-
close
public void close(org.apache.hc.core5.io.CloseMode closeMode) - Specified by:
closein interfaceorg.apache.hc.core5.io.ModalCloseable
-
bind
- Overrides:
bindin classorg.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection- Throws:
IOException
-
bind
- Overrides:
bindin classorg.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection- Throws:
IOException- Since:
- 5.3
-
onResponseReceived
protected void onResponseReceived(org.apache.hc.core5.http.ClassicHttpResponse response) - Overrides:
onResponseReceivedin classorg.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection
-
onRequestSubmitted
protected void onRequestSubmitted(org.apache.hc.core5.http.ClassicHttpRequest request) - Overrides:
onRequestSubmittedin classorg.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection
-
ensureOpen
- Throws:
IOException
-
bind
- Throws:
IOException
-
isOpen
public boolean isOpen()- Specified by:
isOpenin interfaceorg.apache.hc.core5.http.HttpConnection
-
getProtocolVersion
public org.apache.hc.core5.http.ProtocolVersion getProtocolVersion()- Specified by:
getProtocolVersionin interfaceorg.apache.hc.core5.http.HttpConnection
-
getSocketHolder
protected org.apache.hc.core5.http.impl.io.SocketHolder getSocketHolder() -
createContentOutputStream
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) -
createContentInputStream
protected InputStream createContentInputStream(long arg0, org.apache.hc.core5.http.io.SessionInputBuffer arg1, InputStream arg2) -
getRemoteAddress
- Specified by:
getRemoteAddressin interfaceorg.apache.hc.core5.http.HttpConnection
-
getLocalAddress
- Specified by:
getLocalAddressin interfaceorg.apache.hc.core5.http.HttpConnection
-
setSocketTimeout
public void setSocketTimeout(org.apache.hc.core5.util.Timeout arg0) - Specified by:
setSocketTimeoutin interfaceorg.apache.hc.core5.http.SocketModalCloseable
-
getSocketTimeout
public org.apache.hc.core5.util.Timeout getSocketTimeout()- Specified by:
getSocketTimeoutin interfaceorg.apache.hc.core5.http.SocketModalCloseable
-
awaitInput
- Throws:
IOException
-
isDataAvailable
- Specified by:
isDataAvailablein interfaceorg.apache.hc.core5.http.io.BHttpConnection- Throws:
IOException
-
isStale
- Specified by:
isStalein interfaceorg.apache.hc.core5.http.io.BHttpConnection- Throws:
IOException
-
flush
- Specified by:
flushin interfaceorg.apache.hc.core5.http.io.BHttpConnection- Throws:
IOException
-
incrementRequestCount
protected void incrementRequestCount() -
incrementResponseCount
protected void incrementResponseCount() -
getSSLSession
- Specified by:
getSSLSessionin interfaceorg.apache.hc.core5.http.HttpConnection
-
getEndpointDetails
public org.apache.hc.core5.http.EndpointDetails getEndpointDetails()- Specified by:
getEndpointDetailsin interfaceorg.apache.hc.core5.http.HttpConnection
-
toString
-