Class HttpConfig.BuilderBase<BUILDER extends HttpConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends HttpConfig>
java.lang.Object
io.helidon.http.HttpConfig.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>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
- Direct Known Subclasses:
Http1ClientProtocolConfig.BuilderBase, Http1Config.BuilderBase, Http2ClientProtocolConfig.BuilderBase, Http2Config.BuilderBase, HttpConfig.Builder
- Enclosing interface:
HttpConfig
public abstract static class HttpConfig.BuilderBase<BUILDER extends HttpConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends HttpConfig>
extends Object
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
Fluent API builder base for
HttpConfig.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconfig()Configuration used to configure this instance.Update builder from configuration (node of this type).from(HttpConfig prototype) Update this builder from an existing prototype instance.from(HttpConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.log()HTTP Log configuration.log(HttpLogConfig log) HTTP Log configuration.log(Consumer<HttpLogConfig.Builder> consumer) HTTP Log configuration.log(Supplier<? extends HttpLogConfig> supplier) HTTP Log configuration.Configure the maximum size allowed for an entity that can be explicitly buffered by the application by callingio.helidon.http.media.ReadableEntity.buffer().maxBufferedEntitySize(Size maxBufferedEntitySize) Configure the maximum size allowed for an entity that can be explicitly buffered by the application by callingio.helidon.http.media.ReadableEntity.buffer().intConfigure the maximum allowed headers size, which must be greater than0.maxHeadersSize(int maxHeadersSize) Configure the maximum allowed headers size, which must be greater than0.protected voidHandles providers and decorators.toString()protected voidValidates required properties.booleanWhether to validate request headers.validateRequestHeaders(boolean validateRequestHeaders) Whether to validate request headers.booleanWhether to validate response headers.validateResponseHeaders(boolean validateResponseHeaders) Whether to validate response headers.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Prototype.Builder
buildPrototype, self
-
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:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends HttpConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends HttpConfig>- Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
maxHeadersSize
Configure the maximum allowed headers size, which must be greater than0. Defaults to16384.- Parameters:
maxHeadersSize- maximum headers size- Returns:
- updated builder instance
- See Also:
-
maxBufferedEntitySize
Configure the maximum size allowed for an entity that can be explicitly buffered by the application by callingio.helidon.http.media.ReadableEntity.buffer().- Parameters:
maxBufferedEntitySize- maximum size for a buffered entity- Returns:
- updated builder instance
- See Also:
-
validateRequestHeaders
Whether to validate request headers. If set to false, any request header value is accepted, otherwise request headers and 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 request headers- Returns:
- updated builder instance
- See Also:
-
validateResponseHeaders
Whether to validate response headers. If set to false, any response header value is accepted, otherwise response headers and known headers are validated by format.Defaults to
true. Disabling this setting can allow invalid response header values to be written.- Parameters:
validateResponseHeaders- whether to validate response headers- Returns:
- updated builder instance
- See Also:
-
log
HTTP Log configuration.- Parameters:
log- log configuration- Returns:
- updated builder instance
- See Also:
-
log
HTTP Log configuration.- Parameters:
consumer- consumer of builder of log configuration- Returns:
- updated builder instance
- See Also:
-
log
HTTP Log configuration.- Parameters:
supplier- supplier of log configuration- Returns:
- updated builder instance
- See Also:
-
maxHeadersSize
public int maxHeadersSize()Configure the maximum allowed headers size, which must be greater than0. Defaults to16384.- Returns:
- maximum headers size
-
maxBufferedEntitySize
Configure the maximum size allowed for an entity that can be explicitly buffered by the application by callingio.helidon.http.media.ReadableEntity.buffer().- Returns:
- maximum size for a buffered entity
-
validateRequestHeaders
public boolean validateRequestHeaders()Whether to validate request headers. If set to false, any request header value is accepted, otherwise request headers and 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:
- whether to validate request headers
-
validateResponseHeaders
public boolean validateResponseHeaders()Whether to validate response headers. If set to false, any response header value is accepted, otherwise response headers and known headers are validated by format.Defaults to
true. Disabling this setting can allow invalid response header values to be written.- Returns:
- whether to validate response headers
-
log
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties. -
config
-