Class ClientH2PrefaceHandler
java.lang.Object
org.apache.hc.core5.http2.impl.nio.ClientH2PrefaceHandler
- All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hc.core5.http.HttpConnection, org.apache.hc.core5.http.impl.nio.HttpConnectionEventHandler, org.apache.hc.core5.http.SocketModalCloseable, org.apache.hc.core5.io.ModalCloseable, org.apache.hc.core5.reactor.IOEventHandler
I/O event handler for events fired by
ProtocolIOSession that implements
client side of the HTTP/2 protocol negotiation handshake always forcing the choice
of HTTP/2.- Since:
- 5.2
-
Constructor Summary
ConstructorsConstructorDescriptionClientH2PrefaceHandler(org.apache.hc.core5.reactor.ProtocolIOSession ioSession, ClientH2StreamMultiplexerFactory http2StreamHandlerFactory, boolean strictALPNHandshake, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.ProtocolIOSession> resultCallback, org.apache.hc.core5.function.Callback<Exception> exceptionCallback) ClientH2PrefaceHandler(org.apache.hc.core5.reactor.ProtocolIOSession ioSession, ClientH2StreamMultiplexerFactory http2StreamHandlerFactory, boolean strictALPNHandshake, org.apache.hc.core5.function.Callback<Exception> exceptionCallback) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidclose(org.apache.hc.core5.io.CloseMode closeMode) voidconnected(org.apache.hc.core5.reactor.IOSession session) voiddisconnected(org.apache.hc.core5.reactor.IOSession session) voidorg.apache.hc.core5.http.EndpointDetailsorg.apache.hc.core5.http.ProtocolVersionorg.apache.hc.core5.util.TimeoutvoidinputReady(org.apache.hc.core5.reactor.IOSession session, ByteBuffer src) booleanisOpen()voidoutputReady(org.apache.hc.core5.reactor.IOSession session) voidsetSocketTimeout(org.apache.hc.core5.util.Timeout timeout) voidtimeout(org.apache.hc.core5.reactor.IOSession session, org.apache.hc.core5.util.Timeout timeout) toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hc.core5.http.HttpConnection
isIdle
-
Constructor Details
-
ClientH2PrefaceHandler
public ClientH2PrefaceHandler(org.apache.hc.core5.reactor.ProtocolIOSession ioSession, ClientH2StreamMultiplexerFactory http2StreamHandlerFactory, boolean strictALPNHandshake, org.apache.hc.core5.function.Callback<Exception> exceptionCallback) -
ClientH2PrefaceHandler
public ClientH2PrefaceHandler(org.apache.hc.core5.reactor.ProtocolIOSession ioSession, ClientH2StreamMultiplexerFactory http2StreamHandlerFactory, boolean strictALPNHandshake, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.ProtocolIOSession> resultCallback, org.apache.hc.core5.function.Callback<Exception> exceptionCallback) - Since:
- 5.1
-
-
Method Details
-
connected
- Throws:
IOException
-
outputReady
- Throws:
IOException
-
inputReady
public void inputReady(org.apache.hc.core5.reactor.IOSession session, ByteBuffer src) throws IOException - Throws:
IOException
-
toString
-
timeout
public void timeout(org.apache.hc.core5.reactor.IOSession session, org.apache.hc.core5.util.Timeout timeout) - Specified by:
timeoutin interfaceorg.apache.hc.core5.reactor.IOEventHandler
-
exception
- Specified by:
exceptionin interfaceorg.apache.hc.core5.reactor.IOEventHandler
-
disconnected
public void disconnected(org.apache.hc.core5.reactor.IOSession session) - Specified by:
disconnectedin interfaceorg.apache.hc.core5.reactor.IOEventHandler
-
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
-
setSocketTimeout
public void setSocketTimeout(org.apache.hc.core5.util.Timeout timeout) - 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
-
getProtocolVersion
public org.apache.hc.core5.http.ProtocolVersion getProtocolVersion()- Specified by:
getProtocolVersionin interfaceorg.apache.hc.core5.http.HttpConnection
-
getRemoteAddress
- Specified by:
getRemoteAddressin interfaceorg.apache.hc.core5.http.HttpConnection
-
getLocalAddress
- Specified by:
getLocalAddressin interfaceorg.apache.hc.core5.http.HttpConnection
-
isOpen
public boolean isOpen()- Specified by:
isOpenin interfaceorg.apache.hc.core5.http.HttpConnection
-
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
-