Module io.helidon.webserver
Package io.helidon.webserver.http1
Class Http1Config.BuilderBase<BUILDER extends Http1Config.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Http1Config>
java.lang.Object
io.helidon.webserver.http1.Http1Config.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER
- type of the builder extending this abstract builderPROTOTYPE
- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,
,PROTOTYPE> Prototype.ConfiguredBuilder<BUILDER,
PROTOTYPE>
- Direct Known Subclasses:
Http1Config.Builder
- Enclosing interface:
Http1Config
public abstract static class Http1Config.BuilderBase<BUILDER extends Http1Config.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Http1Config>
extends Object
implements Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
Http1Config
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddReceiveListener
(Http1ConnectionListener receiveListener) Connection receive event listeners for HTTP/1.1.addReceiveListeners
(List<? extends Http1ConnectionListener> receiveListeners) Connection receive event listeners for HTTP/1.1.addSendListener
(Http1ConnectionListener sendListener) Connection send event listeners for HTTP/1.1.addSendListeners
(List<? extends Http1ConnectionListener> sendListeners) Connection send event listeners for HTTP/1.1.A single receive listener, this value is computed.compositeReceiveListener
(Http1ConnectionListener compositeReceiveListener) A single receive listener, this value is computed.A single send listener, this value is computed.compositeSendListener
(Http1ConnectionListener compositeSendListener) A single send listener, this value is computed.config()
If this instance was configured, this would be the config instance used.Update builder from configuration (node of this type).boolean
When true WebServer answers to expect continue with 100 continue immediately, not waiting for user to actually request the data.continueImmediately
(boolean continueImmediately) When true WebServer answers to expect continue with 100 continue immediately, not waiting for user to actually request the data.from
(Http1Config prototype) Update this builder from an existing prototype instance.from
(Http1Config.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.int
Maximal size of received headers in bytes.maxHeadersSize
(int maxHeadersSize) Maximal size of received headers in bytes.int
Maximal size of received HTTP prologue (GET /path HTTP/1.1).maxPrologueLength
(int maxPrologueLength) Maximal size of received HTTP prologue (GET /path HTTP/1.1).name()
Name of this configuration, in most cases the same asNamedService.type()
.Name of this configuration, in most cases the same asNamedService.type()
.protected void
Handles providers and decorators.Connection receive event listeners for HTTP/1.1.receiveListeners
(List<? extends Http1ConnectionListener> receiveListeners) Connection receive event listeners for HTTP/1.1.boolean
Logging of received packets.receiveLog
(boolean receiveLog) Logging of received packets.Requested URI discovery settings.requestedUriDiscovery
(RequestedUriDiscoveryContext requestedUriDiscovery) Requested URI discovery settings.Requested URI discovery settings.requestedUriDiscovery
(Supplier<? extends RequestedUriDiscoveryContext> supplier) Requested URI discovery settings.Connection send event listeners for HTTP/1.1.sendListeners
(List<? extends Http1ConnectionListener> sendListeners) Connection send event listeners for HTTP/1.1.boolean
sendLog()
Logging of sent packets.sendLog
(boolean sendLog) Logging of sent packets.toString()
boolean
If set to false, any path is accepted (even containing illegal characters).validatePath
(boolean validatePath) If set to false, any path is accepted (even containing illegal characters).boolean
If set to false, any query and fragment is accepted (even containing illegal characters).validatePrologue
(boolean validatePrologue) If set to false, any query and fragment is accepted (even containing illegal characters).protected void
Validates required properties.boolean
Whether to validate headers.validateRequestHeaders
(boolean validateRequestHeaders) Whether to validate headers.boolean
Deprecated, for removal: This API element is subject to removal in a future version.this switch exists for temporary backward compatible behavior, and will be removed in a future Helidon versionvalidateRequestHostHeader
(boolean validateRequestHostHeader) Deprecated, for removal: This API element is subject to removal in a future version.this switch exists for temporary backward compatible behavior, and will be removed in a future Helidon versionboolean
Whether to validate headers.validateResponseHeaders
(boolean validateResponseHeaders) Whether to validate headers.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
Methods inherited from interface io.helidon.builder.api.Prototype.ConfiguredBuilder
discoverService, discoverServices
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype
- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder
- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfacePrototype.ConfiguredBuilder<BUILDER extends Http1Config.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends Http1Config> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
name
Name of this configuration, in most cases the same asNamedService.type()
.- Parameters:
name
- name of this configuration- Returns:
- updated builder instance
- See Also:
-
maxPrologueLength
Maximal size of received HTTP prologue (GET /path HTTP/1.1).- Parameters:
maxPrologueLength
- maximal size in bytes- Returns:
- updated builder instance
- See Also:
-
maxHeadersSize
Maximal size of received headers in bytes.- Parameters:
maxHeadersSize
- maximal header size- Returns:
- updated builder instance
- See Also:
-
validateRequestHeaders
Whether to validate headers. If set to false, any value is accepted, otherwise validates headers + known headers are validated by format (content length is always validated as it is part of protocol processing (other headers may be validated if features use them)).Defaults to
true
.- Parameters:
validateRequestHeaders
- whether to validate headers- Returns:
- updated builder instance
- See Also:
-
validateRequestHostHeader
@Deprecated(since="4.1.3", forRemoval=true) public BUILDER validateRequestHostHeader(boolean validateRequestHostHeader) Deprecated, for removal: This API element is subject to removal in a future version.this switch exists for temporary backward compatible behavior, and will be removed in a future Helidon versionRequest host header validation. When host header is invalid, we returnStatus.BAD_REQUEST_400
.The validation is done according to RFC-3986 (see
UriValidator
). This is a requirement of the HTTP specification.This option allows you to disable the "full-blown" validation ("simple" validation is still in - the port must be parseable to integer).
- Parameters:
validateRequestHostHeader
- whether to do a full validation ofHost
header according to the specification- Returns:
- updated builder instance
- See Also:
-
validateResponseHeaders
Whether to validate headers. If set to false, any value is accepted, otherwise validates headers + known headers are validated by format (content length is always validated as it is part of protocol processing (other headers may be validated if features use them)).Defaults to
false
as user has control on the header creation.- Parameters:
validateResponseHeaders
- whether to validate headers- Returns:
- updated builder instance
- See Also:
-
validatePrologue
If set to false, any query and fragment is accepted (even containing illegal characters). Validation of path is controlled byvalidatePath()
.- Parameters:
validatePrologue
- whether to validate prologue query and fragment- Returns:
- updated builder instance
- See Also:
-
validatePath
If set to false, any path is accepted (even containing illegal characters).- Parameters:
validatePath
- whether to validate path- Returns:
- updated builder instance
- See Also:
-
receiveLog
Logging of received packets. Uses trace and debug levels on logger ofHttp1LoggingConnectionListener
with suffix of.recv`
.- Parameters:
receiveLog
-true
if logging should be enabled for received packets,false
if no logging should be done- Returns:
- updated builder instance
- See Also:
-
sendLog
Logging of sent packets. Uses trace and debug levels on logger ofHttp1LoggingConnectionListener
with suffix of.send`
.- Parameters:
sendLog
-true
if logging should be enabled for sent packets,false
if no logging should be done- Returns:
- updated builder instance
- See Also:
-
continueImmediately
When true WebServer answers to expect continue with 100 continue immediately, not waiting for user to actually request the data.- Parameters:
continueImmediately
- iftrue
answer with 100 continue immediately after expect continue- Returns:
- updated builder instance
- See Also:
-
requestedUriDiscovery
Requested URI discovery settings.- Parameters:
requestedUriDiscovery
- settings for computing the requested URI- Returns:
- updated builder instance
- See Also:
-
requestedUriDiscovery
Requested URI discovery settings.- Parameters:
consumer
- consumer of builder for settings for computing the requested URI- Returns:
- updated builder instance
- See Also:
-
requestedUriDiscovery
Requested URI discovery settings.- Parameters:
supplier
- supplier of settings for computing the requested URI- Returns:
- updated builder instance
- See Also:
-
sendListeners
Connection send event listeners for HTTP/1.1.- Parameters:
sendListeners
- send event listeners- Returns:
- updated builder instance
- See Also:
-
addSendListeners
Connection send event listeners for HTTP/1.1.- Parameters:
sendListeners
- send event listeners- Returns:
- updated builder instance
- See Also:
-
addSendListener
Connection send event listeners for HTTP/1.1.- Parameters:
sendListener
- send event listeners- Returns:
- updated builder instance
- See Also:
-
receiveListeners
Connection receive event listeners for HTTP/1.1.- Parameters:
receiveListeners
- receive event listeners- Returns:
- updated builder instance
- See Also:
-
addReceiveListeners
Connection receive event listeners for HTTP/1.1.- Parameters:
receiveListeners
- receive event listeners- Returns:
- updated builder instance
- See Also:
-
addReceiveListener
Connection receive event listeners for HTTP/1.1.- Parameters:
receiveListener
- receive event listeners- Returns:
- updated builder instance
- See Also:
-
compositeSendListener
A single send listener, this value is computed.- Parameters:
compositeSendListener
- send listener- Returns:
- updated builder instance
- See Also:
-
compositeReceiveListener
A single receive listener, this value is computed.- Parameters:
compositeReceiveListener
- receive listener- Returns:
- updated builder instance
- See Also:
-
name
Name of this configuration, in most cases the same asNamedService.type()
.- Returns:
- the name
-
maxPrologueLength
public int maxPrologueLength()Maximal size of received HTTP prologue (GET /path HTTP/1.1).- Returns:
- the max prologue length
-
maxHeadersSize
public int maxHeadersSize()Maximal size of received headers in bytes.- Returns:
- the max headers size
-
validateRequestHeaders
public boolean validateRequestHeaders()Whether to validate headers. If set to false, any value is accepted, otherwise validates headers + known headers are validated by format (content length is always validated as it is part of protocol processing (other headers may be validated if features use them)).Defaults to
true
.- Returns:
- the validate request headers
-
validateRequestHostHeader
Deprecated, for removal: This API element is subject to removal in a future version.this switch exists for temporary backward compatible behavior, and will be removed in a future Helidon versionRequest host header validation. When host header is invalid, we returnStatus.BAD_REQUEST_400
.The validation is done according to RFC-3986 (see
UriValidator
). This is a requirement of the HTTP specification.This option allows you to disable the "full-blown" validation ("simple" validation is still in - the port must be parseable to integer).
- Returns:
- the validate request host header
-
validateResponseHeaders
public boolean validateResponseHeaders()Whether to validate headers. If set to false, any value is accepted, otherwise validates headers + known headers are validated by format (content length is always validated as it is part of protocol processing (other headers may be validated if features use them)).Defaults to
false
as user has control on the header creation.- Returns:
- the validate response headers
-
validatePrologue
public boolean validatePrologue()If set to false, any query and fragment is accepted (even containing illegal characters). Validation of path is controlled byvalidatePath()
.- Returns:
- the validate prologue
-
validatePath
public boolean validatePath()If set to false, any path is accepted (even containing illegal characters).- Returns:
- the validate path
-
receiveLog
public boolean receiveLog()Logging of received packets. Uses trace and debug levels on logger ofHttp1LoggingConnectionListener
with suffix of.recv`
.- Returns:
- the receive log
-
sendLog
public boolean sendLog()Logging of sent packets. Uses trace and debug levels on logger ofHttp1LoggingConnectionListener
with suffix of.send`
.- Returns:
- the send log
-
continueImmediately
public boolean continueImmediately()When true WebServer answers to expect continue with 100 continue immediately, not waiting for user to actually request the data.- Returns:
- the continue immediately
-
requestedUriDiscovery
Requested URI discovery settings.- Returns:
- the requested uri discovery
-
sendListeners
Connection send event listeners for HTTP/1.1.- Returns:
- the send listeners
-
receiveListeners
Connection receive event listeners for HTTP/1.1.- Returns:
- the receive listeners
-
compositeSendListener
A single send listener, this value is computed.- Returns:
- the composite send listener
-
compositeReceiveListener
A single receive listener, this value is computed.- Returns:
- the composite receive listener
-
config
If this instance was configured, this would be the config instance used.- Returns:
- config node used to configure this builder, or empty if not configured
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-