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.intHow 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:ServerConnectionSelectorHow many bytes are needed to identify this connection.- Specified by:
bytesToIdentifyConnectionin interfaceServerConnectionSelector- Returns:
- number of bytes needed, return 0 if this is not a fixed value
-
supports
Description copied from interface:ServerConnectionSelectorDoes this selector support current server connection. The same buffer will be sent toServerConnection.handle(java.util.concurrent.Semaphore)- Specified by:
supportsin interfaceServerConnectionSelector- Parameters:
request- bytes (with available bytes of at leastServerConnectionSelector.bytesToIdentifyConnection())- Returns:
- support response
-
supportedApplicationProtocols
Description copied from interface:ServerConnectionSelectorApplication protocols supported by this selector, used for example for ALPN negotiation.- Specified by:
supportedApplicationProtocolsin interfaceServerConnectionSelector- Returns:
- set of supported protocols
-
connection
Description copied from interface:ServerConnectionSelectorCreate a new connection. All methods will be invoked from a SINGLE virtual thread.- Specified by:
connectionin 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.ApiThe prototype as it was received when creating this runtime object instance.- Specified by:
prototypein interfaceRuntimeType.Api<Http1ConnectionSelectorConfig>- Returns:
- prototype object used to create this instance
-