Class ServerH2PrefaceHandler
- java.lang.Object
-
- org.apache.hc.core5.http2.impl.nio.PrefaceHandlerBase
-
- org.apache.hc.core5.http2.impl.nio.ServerH2PrefaceHandler
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,HttpConnection,HttpConnectionEventHandler,SocketModalCloseable,ModalCloseable,IOEventHandler
@Internal public class ServerH2PrefaceHandler extends PrefaceHandlerBase
I/O event handler for events fired byProtocolIOSessionthat implements server side of the HTTP/2 protocol negotiation handshake.- Since:
- 5.2
-
-
Field Summary
Fields Modifier and Type Field Description private ServerH2StreamMultiplexerFactoryhttp2StreamHandlerFactoryprivate BufferedDatainBuf(package private) static byte[]PREFACE-
Fields inherited from class org.apache.hc.core5.http2.impl.nio.PrefaceHandlerBase
ioSession
-
-
Constructor Summary
Constructors Constructor Description ServerH2PrefaceHandler(ProtocolIOSession ioSession, ServerH2StreamMultiplexerFactory http2StreamHandlerFactory)ServerH2PrefaceHandler(ProtocolIOSession ioSession, ServerH2StreamMultiplexerFactory http2StreamHandlerFactory, FutureCallback<ProtocolIOSession> resultCallback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnected(IOSession session)Triggered after the given session has been just created.voidinputReady(IOSession session, java.nio.ByteBuffer src)Triggered when the given session has input pending.voidoutputReady(IOSession session)Triggered when the given session is ready for output.java.lang.StringtoString()-
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 Detail
-
PREFACE
static final byte[] PREFACE
-
http2StreamHandlerFactory
private final ServerH2StreamMultiplexerFactory http2StreamHandlerFactory
-
inBuf
private final BufferedData inBuf
-
-
Constructor Detail
-
ServerH2PrefaceHandler
public ServerH2PrefaceHandler(ProtocolIOSession ioSession, ServerH2StreamMultiplexerFactory http2StreamHandlerFactory)
-
ServerH2PrefaceHandler
public ServerH2PrefaceHandler(ProtocolIOSession ioSession, ServerH2StreamMultiplexerFactory http2StreamHandlerFactory, FutureCallback<ProtocolIOSession> resultCallback)
-
-
Method Detail
-
connected
public void connected(IOSession session) throws java.io.IOException
Description copied from interface:IOEventHandlerTriggered after the given session has been just created.- Parameters:
session- the I/O session.- Throws:
java.io.IOException
-
inputReady
public void inputReady(IOSession session, java.nio.ByteBuffer src) throws java.io.IOException
Description copied from interface:IOEventHandlerTriggered when the given session has input pending.- Parameters:
session- the I/O session.- Throws:
java.io.IOException
-
outputReady
public void outputReady(IOSession session) throws java.io.IOException
Description copied from interface:IOEventHandlerTriggered when the given session is ready for output.- Parameters:
session- the I/O session.- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-