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,HttpConnection,BHttpConnection,HttpClientConnection,SocketModalCloseable,ModalCloseable,Identifiable
public class LoggingBHttpClientConnection
extends DefaultBHttpClientConnection
implements Identifiable
-
Constructor Summary
ConstructorsConstructorDescriptionLoggingBHttpClientConnection(Http1Config http1Config) LoggingBHttpClientConnection(Http1Config http1Config, CharsetDecoder charDecoder, CharsetEncoder charEncoder, ContentLengthStrategy incomingContentStrategy, ContentLengthStrategy outgoingContentStrategy, HttpMessageWriterFactory<ClassicHttpRequest> requestWriterFactory, HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanawaitInput(Timeout arg0) voidvoidprotected voidbind(SocketHolder arg0) voidclose()voidprotected InputStreamcreateContentInputStream(long arg0, SessionInputBuffer arg1, InputStream arg2) protected OutputStreamcreateContentOutputStream(long arg0, SessionOutputBuffer arg1, OutputStream arg2, Supplier<List<? extends Header>> arg3) protected SocketHoldervoidflush()getId()protected SocketHolderprotected voidprotected voidbooleanisDataAvailable(Timeout arg0) booleanisOpen()booleanisStale()protected voidonRequestSubmitted(ClassicHttpRequest request) protected voidonResponseReceived(ClassicHttpResponse response) voidsetSocketTimeout(Timeout arg0) toString()Methods inherited from class org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection
isConsistent, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader, terminateRequestMethods inherited from class java.lang.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, isOpenMethods inherited from interface org.apache.hc.core5.http.SocketModalCloseable
getSocketTimeout, setSocketTimeout
-
Constructor Details
-
LoggingBHttpClientConnection
public LoggingBHttpClientConnection(Http1Config http1Config, CharsetDecoder charDecoder, CharsetEncoder charEncoder, ContentLengthStrategy incomingContentStrategy, ContentLengthStrategy outgoingContentStrategy, HttpMessageWriterFactory<ClassicHttpRequest> requestWriterFactory, HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory) -
LoggingBHttpClientConnection
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceIdentifiable
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceHttpConnection- Throws:
IOException
-
close
- Specified by:
closein interfaceModalCloseable
-
bind
- Overrides:
bindin classDefaultBHttpClientConnection- Throws:
IOException
-
bind
- Overrides:
bindin classDefaultBHttpClientConnection- Throws:
IOException- Since:
- 5.3
-
onResponseReceived
- Overrides:
onResponseReceivedin classDefaultBHttpClientConnection
-
onRequestSubmitted
- Overrides:
onRequestSubmittedin classDefaultBHttpClientConnection
-
ensureOpen
- Throws:
IOException
-
bind
- Throws:
IOException
-
isOpen
public boolean isOpen()- Specified by:
isOpenin interfaceHttpConnection
-
getProtocolVersion
- Specified by:
getProtocolVersionin interfaceHttpConnection
-
getSocketHolder
-
createContentOutputStream
protected OutputStream createContentOutputStream(long arg0, SessionOutputBuffer arg1, OutputStream arg2, Supplier<List<? extends Header>> arg3) -
createContentInputStream
protected InputStream createContentInputStream(long arg0, SessionInputBuffer arg1, InputStream arg2) -
getRemoteAddress
- Specified by:
getRemoteAddressin interfaceHttpConnection
-
getLocalAddress
- Specified by:
getLocalAddressin interfaceHttpConnection
-
setSocketTimeout
- Specified by:
setSocketTimeoutin interfaceSocketModalCloseable
-
getSocketTimeout
- Specified by:
getSocketTimeoutin interfaceSocketModalCloseable
-
awaitInput
- Throws:
IOException
-
isDataAvailable
- Specified by:
isDataAvailablein interfaceBHttpConnection- Throws:
IOException
-
isStale
- Specified by:
isStalein interfaceBHttpConnection- Throws:
IOException
-
flush
- Specified by:
flushin interfaceBHttpConnection- Throws:
IOException
-
incrementRequestCount
protected void incrementRequestCount() -
incrementResponseCount
protected void incrementResponseCount() -
getSSLSession
- Specified by:
getSSLSessionin interfaceHttpConnection
-
getEndpointDetails
- Specified by:
getEndpointDetailsin interfaceHttpConnection
-
toString
-