Class ClientH2PrefaceHandler
java.lang.Object
org.apache.hc.core5.http2.impl.nio.PrefaceHandlerBase
org.apache.hc.core5.http2.impl.nio.ClientH2PrefaceHandler
- All Implemented Interfaces:
Closeable,AutoCloseable,HttpConnection,HttpConnectionEventHandler,SocketModalCloseable,ModalCloseable,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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientH2StreamMultiplexerFactoryprivate BufferedDataprivate final AtomicBooleanprivate ByteBuffer(package private) static final byte[]private final booleanFields inherited from class org.apache.hc.core5.http2.impl.nio.PrefaceHandlerBase
ioSession -
Constructor Summary
ConstructorsConstructorDescriptionClientH2PrefaceHandler(ProtocolIOSession ioSession, ClientH2StreamMultiplexerFactory http2StreamHandlerFactory, boolean strictALPNHandshake) ClientH2PrefaceHandler(ProtocolIOSession ioSession, ClientH2StreamMultiplexerFactory http2StreamHandlerFactory, boolean strictALPNHandshake, FutureCallback<ProtocolIOSession> resultCallback) -
Method Summary
Modifier and TypeMethodDescriptionvoidTriggered after the given session has been just created.private voidvoidinputReady(IOSession session, ByteBuffer src) Triggered when the given session has input pending.voidoutputReady(IOSession session) Triggered when the given session is ready for output.toString()private voidwriteOutPreface(IOSession session) Methods inherited from class org.apache.hc.core5.http2.impl.nio.PrefaceHandlerBase
close, close, disconnected, exception, getEndpointDetails, getLocalAddress, getProtocolVersion, getRemoteAddress, getSocketTimeout, getSSLSession, isOpen, setSocketTimeout, startProtocol, timeout
-
Field Details
-
PREFACE
static final byte[] PREFACE -
http2StreamHandlerFactory
-
strictALPNHandshake
private final boolean strictALPNHandshake -
initialized
-
preface
-
inBuf
-
-
Constructor Details
-
ClientH2PrefaceHandler
public ClientH2PrefaceHandler(ProtocolIOSession ioSession, ClientH2StreamMultiplexerFactory http2StreamHandlerFactory, boolean strictALPNHandshake) -
ClientH2PrefaceHandler
public ClientH2PrefaceHandler(ProtocolIOSession ioSession, ClientH2StreamMultiplexerFactory http2StreamHandlerFactory, boolean strictALPNHandshake, FutureCallback<ProtocolIOSession> resultCallback) - Since:
- 5.1
-
-
Method Details
-
initialize
- Throws:
IOException
-
writeOutPreface
- Throws:
IOException
-
connected
Description copied from interface:IOEventHandlerTriggered after the given session has been just created.- Parameters:
session- the I/O session.- Throws:
IOException
-
outputReady
Description copied from interface:IOEventHandlerTriggered when the given session is ready for output.- Parameters:
session- the I/O session.- Throws:
IOException
-
inputReady
Description copied from interface:IOEventHandlerTriggered when the given session has input pending.- Parameters:
session- the I/O session.- Throws:
IOException
-
toString
-