Class LoggingBHttpServerConnection
java.lang.Object
org.apache.hc.core5.http.impl.io.DefaultBHttpServerConnection
org.apache.hc.core5.testing.classic.LoggingBHttpServerConnection
- All Implemented Interfaces:
Closeable,AutoCloseable,HttpConnection,BHttpConnection,HttpServerConnection,SocketModalCloseable,ModalCloseable,Identifiable
public class LoggingBHttpServerConnection
extends DefaultBHttpServerConnection
implements Identifiable
-
Constructor Summary
ConstructorsConstructorDescriptionLoggingBHttpServerConnection(String scheme, Http1Config http1Config) LoggingBHttpServerConnection(String scheme, Http1Config http1Config, CharsetDecoder charDecoder, CharsetEncoder charEncoder, ContentLengthStrategy incomingContentStrategy, ContentLengthStrategy outgoingContentStrategy, HttpMessageParserFactory<ClassicHttpRequest> requestParserFactory, HttpMessageWriterFactory<ClassicHttpResponse> responseWriterFactory) -
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 voidonRequestReceived(ClassicHttpRequest request) protected voidonResponseSubmitted(ClassicHttpResponse response) voidsetSocketTimeout(Timeout arg0) toString()Methods inherited from class org.apache.hc.core5.http.impl.io.DefaultBHttpServerConnection
receiveRequestEntity, receiveRequestHeader, sendResponseEntity, sendResponseHeaderMethods 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
-
LoggingBHttpServerConnection
public LoggingBHttpServerConnection(String scheme, Http1Config http1Config, CharsetDecoder charDecoder, CharsetEncoder charEncoder, ContentLengthStrategy incomingContentStrategy, ContentLengthStrategy outgoingContentStrategy, HttpMessageParserFactory<ClassicHttpRequest> requestParserFactory, HttpMessageWriterFactory<ClassicHttpResponse> responseWriterFactory) -
LoggingBHttpServerConnection
-
-
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 classDefaultBHttpServerConnection- Throws:
IOException
-
bind
- Overrides:
bindin classDefaultBHttpServerConnection- Throws:
IOException- Since:
- 5.3
-
onRequestReceived
- Overrides:
onRequestReceivedin classDefaultBHttpServerConnection
-
onResponseSubmitted
- Overrides:
onResponseSubmittedin classDefaultBHttpServerConnection
-
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
-