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, org.apache.hc.core5.http.HttpConnection, org.apache.hc.core5.http.io.BHttpConnection, org.apache.hc.core5.http.io.HttpServerConnection, org.apache.hc.core5.http.SocketModalCloseable, org.apache.hc.core5.io.ModalCloseable, org.apache.hc.core5.util.Identifiable
public class LoggingBHttpServerConnection
extends org.apache.hc.core5.http.impl.io.DefaultBHttpServerConnection
implements org.apache.hc.core5.util.Identifiable
-
Constructor Summary
ConstructorsConstructorDescriptionLoggingBHttpServerConnection(String scheme, org.apache.hc.core5.http.config.Http1Config http1Config) LoggingBHttpServerConnection(String scheme, 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.HttpMessageParserFactory<org.apache.hc.core5.http.ClassicHttpRequest> requestParserFactory, org.apache.hc.core5.http.io.HttpMessageWriterFactory<org.apache.hc.core5.http.ClassicHttpResponse> responseWriterFactory) -
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 voidonRequestReceived(org.apache.hc.core5.http.ClassicHttpRequest request) protected voidonResponseSubmitted(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.DefaultBHttpServerConnection
receiveRequestEntity, receiveRequestHeader, sendResponseEntity, sendResponseHeaderMethods 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
-
LoggingBHttpServerConnection
public LoggingBHttpServerConnection(String scheme, 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.HttpMessageParserFactory<org.apache.hc.core5.http.ClassicHttpRequest> requestParserFactory, org.apache.hc.core5.http.io.HttpMessageWriterFactory<org.apache.hc.core5.http.ClassicHttpResponse> responseWriterFactory) -
LoggingBHttpServerConnection
public LoggingBHttpServerConnection(String scheme, 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.DefaultBHttpServerConnection- Throws:
IOException
-
bind
- Overrides:
bindin classorg.apache.hc.core5.http.impl.io.DefaultBHttpServerConnection- Throws:
IOException- Since:
- 5.3
-
onRequestReceived
protected void onRequestReceived(org.apache.hc.core5.http.ClassicHttpRequest request) - Overrides:
onRequestReceivedin classorg.apache.hc.core5.http.impl.io.DefaultBHttpServerConnection
-
onResponseSubmitted
protected void onResponseSubmitted(org.apache.hc.core5.http.ClassicHttpResponse response) - Overrides:
onResponseSubmittedin classorg.apache.hc.core5.http.impl.io.DefaultBHttpServerConnection
-
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
-