java.lang.Object
io.helidon.webserver.http2.Http2ConnectionSelector
- All Implemented Interfaces:
ServerConnectionSelector
HTTP/2 server connection selector.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webserver.spi.ServerConnectionSelector
ServerConnectionSelector.Support
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Builder to set up this provider.int
How many bytes are needed to identify this connection.Create a new connection.Application protocols supported by this selector, used for example for ALPN negotiation.supports
(BufferData request) Does this selector support current server connection.
-
Method Details
-
builder
Builder to set up this provider.- Returns:
- a new builder
-
bytesToIdentifyConnection
public int bytesToIdentifyConnection()Description copied from interface:ServerConnectionSelector
How many bytes are needed to identify this connection.- Specified by:
bytesToIdentifyConnection
in interfaceServerConnectionSelector
- Returns:
- number of bytes needed, return 0 if this is not a fixed value
-
supports
Description copied from interface:ServerConnectionSelector
Does this selector support current server connection. The same buffer will be sent toServerConnection.handle(java.util.concurrent.Semaphore)
- Specified by:
supports
in interfaceServerConnectionSelector
- Parameters:
request
- bytes (with available bytes of at leastServerConnectionSelector.bytesToIdentifyConnection()
)- Returns:
- support response
-
supportedApplicationProtocols
Description copied from interface:ServerConnectionSelector
Application protocols supported by this selector, used for example for ALPN negotiation.- Specified by:
supportedApplicationProtocols
in interfaceServerConnectionSelector
- Returns:
- set of supported protocols
-
connection
Description copied from interface:ServerConnectionSelector
Create a new connection. All methods will be invoked from a SINGLE virtual thread.- Specified by:
connection
in interfaceServerConnectionSelector
- Parameters:
ctx
- connection context with access to data writer, data reader and other useful information- Returns:
- a new server connection
-