java.lang.Object
io.helidon.webserver.http1.Http1ConnectionSelector
- All Implemented Interfaces:
RuntimeType.Api<Http1ConnectionSelectorConfig>
,ServerConnectionSelector
public class Http1ConnectionSelector
extends Object
implements ServerConnectionSelector, RuntimeType.Api<Http1ConnectionSelectorConfig>
HTTP/1.1 server connection selector.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webserver.spi.ServerConnectionSelector
ServerConnectionSelector.Support
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
HTTP/1 connection selector builder.int
How many bytes are needed to identify this connection.Create a new connection.The prototype as it was received when creating this runtime object instance.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
HTTP/1 connection selector builder.- Returns:
- a new fluent API 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
-
prototype
Description copied from interface:RuntimeType.Api
The prototype as it was received when creating this runtime object instance.- Specified by:
prototype
in interfaceRuntimeType.Api<Http1ConnectionSelectorConfig>
- Returns:
- prototype object used to create this instance
-