Module io.helidon.webserver
Package io.helidon.webserver.http1
Class Http1Config.BuilderBase.Http1ConfigImpl
java.lang.Object
io.helidon.webserver.http1.Http1Config.BuilderBase.Http1ConfigImpl
- All Implemented Interfaces:
Prototype.Api
,NamedService
,Http1Config
,ProtocolConfig
- Enclosing class:
Http1Config.BuilderBase<BUILDER extends Http1Config.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends Http1Config>
protected static class Http1Config.BuilderBase.Http1ConfigImpl
extends Object
implements Http1Config
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webserver.http1.Http1Config
Http1Config.Builder, Http1Config.BuilderBase<BUILDER extends Http1Config.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends Http1Config> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Http1ConfigImpl
(Http1Config.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionA single receive listener, this value is computed.A single send listener, this value is computed.boolean
When true WebServer answers to expect continue with 100 continue immediately, not waiting for user to actually request the data.boolean
int
hashCode()
int
Maximal size of received headers in bytes.int
Maximal size of received HTTP prologue (GET /path HTTP/1.1).name()
Name of this configuration, in most cases the same asNamedService.type()
.Connection receive event listeners for HTTP/1.1.boolean
Logging of received packets.Requested URI discovery settings.Connection send event listeners for HTTP/1.1.boolean
sendLog()
Logging of sent packets.toString()
default String
type()
Protocol configuration type.boolean
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).boolean
Whether to validate headers.boolean
Request host header validation.boolean
Whether to validate headers.
-
Constructor Details
-
Http1ConfigImpl
Create an instance providing a builder.- Parameters:
builder
- extending builder base of this prototype
-
-
Method Details
-
name
Description copied from interface:Http1Config
Name of this configuration, in most cases the same asNamedService.type()
.- Specified by:
name
in interfaceHttp1Config
- Specified by:
name
in interfaceNamedService
- Returns:
- name of this configuration
-
maxPrologueLength
public int maxPrologueLength()Description copied from interface:Http1Config
Maximal size of received HTTP prologue (GET /path HTTP/1.1).- Specified by:
maxPrologueLength
in interfaceHttp1Config
- Returns:
- maximal size in bytes
-
maxHeadersSize
public int maxHeadersSize()Description copied from interface:Http1Config
Maximal size of received headers in bytes.- Specified by:
maxHeadersSize
in interfaceHttp1Config
- Returns:
- maximal header size
-
validateRequestHeaders
public boolean validateRequestHeaders()Description copied from interface:Http1Config
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
.- Specified by:
validateRequestHeaders
in interfaceHttp1Config
- Returns:
- whether to validate headers
-
validateRequestHostHeader
public boolean validateRequestHostHeader()Description copied from interface:Http1Config
Request 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).
- Specified by:
validateRequestHostHeader
in interfaceHttp1Config
- Returns:
- whether to do a full validation of
Host
header according to the specification
-
validateResponseHeaders
public boolean validateResponseHeaders()Description copied from interface:Http1Config
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.- Specified by:
validateResponseHeaders
in interfaceHttp1Config
- Returns:
- whether to validate headers
-
validatePrologue
public boolean validatePrologue()Description copied from interface:Http1Config
If set to false, any query and fragment is accepted (even containing illegal characters). Validation of path is controlled byHttp1Config.validatePath()
.- Specified by:
validatePrologue
in interfaceHttp1Config
- Returns:
- whether to validate prologue query and fragment
-
validatePath
public boolean validatePath()Description copied from interface:Http1Config
If set to false, any path is accepted (even containing illegal characters).- Specified by:
validatePath
in interfaceHttp1Config
- Returns:
- whether to validate path
-
receiveLog
public boolean receiveLog()Description copied from interface:Http1Config
Logging of received packets. Uses trace and debug levels on logger ofHttp1LoggingConnectionListener
with suffix of.recv`
.- Specified by:
receiveLog
in interfaceHttp1Config
- Returns:
true
if logging should be enabled for received packets,false
if no logging should be done
-
sendLog
public boolean sendLog()Description copied from interface:Http1Config
Logging of sent packets. Uses trace and debug levels on logger ofHttp1LoggingConnectionListener
with suffix of.send`
.- Specified by:
sendLog
in interfaceHttp1Config
- Returns:
true
if logging should be enabled for sent packets,false
if no logging should be done
-
continueImmediately
public boolean continueImmediately()Description copied from interface:Http1Config
When true WebServer answers to expect continue with 100 continue immediately, not waiting for user to actually request the data.- Specified by:
continueImmediately
in interfaceHttp1Config
- Returns:
- if
true
answer with 100 continue immediately after expect continue
-
requestedUriDiscovery
Description copied from interface:Http1Config
Requested URI discovery settings.- Specified by:
requestedUriDiscovery
in interfaceHttp1Config
- Returns:
- settings for computing the requested URI
-
sendListeners
Description copied from interface:Http1Config
Connection send event listeners for HTTP/1.1.- Specified by:
sendListeners
in interfaceHttp1Config
- Returns:
- send event listeners
-
receiveListeners
Description copied from interface:Http1Config
Connection receive event listeners for HTTP/1.1.- Specified by:
receiveListeners
in interfaceHttp1Config
- Returns:
- receive event listeners
-
compositeSendListener
Description copied from interface:Http1Config
A single send listener, this value is computed.- Specified by:
compositeSendListener
in interfaceHttp1Config
- Returns:
- send listener
-
compositeReceiveListener
Description copied from interface:Http1Config
A single receive listener, this value is computed.- Specified by:
compositeReceiveListener
in interfaceHttp1Config
- Returns:
- receive listener
-
toString
-
equals
-
hashCode
public int hashCode() -
type
Protocol configuration type.- Specified by:
type
in interfaceNamedService
- Returns:
- type of this configuration
-