Package io.netty.handler.codec.http2
Class InboundHttp2ToHttpAdapterBuilder
java.lang.Object
io.netty.handler.codec.http2.AbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter,InboundHttp2ToHttpAdapterBuilder>
io.netty.handler.codec.http2.InboundHttp2ToHttpAdapterBuilder
@UnstableApi
public final class InboundHttp2ToHttpAdapterBuilder
extends AbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter,InboundHttp2ToHttpAdapterBuilder>
Builds an
InboundHttp2ToHttpAdapter
.-
Constructor Summary
ConstructorsConstructorDescriptionInboundHttp2ToHttpAdapterBuilder
(Http2Connection connection) Creates a newInboundHttp2ToHttpAdapter
builder for the specifiedHttp2Connection
. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds/creates a newInboundHttp2ToHttpAdapter
instance using this builder's current settings.protected InboundHttp2ToHttpAdapter
build
(Http2Connection connection, int maxContentLength, boolean validateHttpHeaders, boolean propagateSettings) Creates a newInboundHttp2ToHttpAdapter
with the specified properties.maxContentLength
(int maxContentLength) Specifies the maximum length of the message content.propagateSettings
(boolean propagate) Specifies whether a read settings frame should be propagated along the channel pipeline.validateHttpHeaders
(boolean validate) Specifies whether validation of HTTP headers should be performed.Methods inherited from class io.netty.handler.codec.http2.AbstractInboundHttp2ToHttpAdapterBuilder
connection, isPropagateSettings, isValidateHttpHeaders, maxContentLength, self
-
Constructor Details
-
InboundHttp2ToHttpAdapterBuilder
Creates a newInboundHttp2ToHttpAdapter
builder for the specifiedHttp2Connection
.- Parameters:
connection
- the object which will provide connection notification events for the current connection
-
-
Method Details
-
maxContentLength
Description copied from class:AbstractInboundHttp2ToHttpAdapterBuilder
Specifies the maximum length of the message content.- Overrides:
maxContentLength
in classAbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter,
InboundHttp2ToHttpAdapterBuilder> - Parameters:
maxContentLength
- the maximum length of the message content. If the length of the message content exceeds this value, aTooLongFrameException
will be raised- Returns:
AbstractInboundHttp2ToHttpAdapterBuilder
the builder for theInboundHttp2ToHttpAdapter
-
validateHttpHeaders
Description copied from class:AbstractInboundHttp2ToHttpAdapterBuilder
Specifies whether validation of HTTP headers should be performed.- Overrides:
validateHttpHeaders
in classAbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter,
InboundHttp2ToHttpAdapterBuilder> - Parameters:
validate
-true
to validate HTTP headers in the http-codecfalse
not to validate HTTP headers in the http-codec
- Returns:
AbstractInboundHttp2ToHttpAdapterBuilder
the builder for theInboundHttp2ToHttpAdapter
-
propagateSettings
Description copied from class:AbstractInboundHttp2ToHttpAdapterBuilder
Specifies whether a read settings frame should be propagated along the channel pipeline.- Overrides:
propagateSettings
in classAbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter,
InboundHttp2ToHttpAdapterBuilder> - Parameters:
propagate
- iftrue
read settings will be passed along the pipeline. This can be useful to clients that need hold off sending data until they have received the settings.- Returns:
AbstractInboundHttp2ToHttpAdapterBuilder
the builder for theInboundHttp2ToHttpAdapter
-
build
Description copied from class:AbstractInboundHttp2ToHttpAdapterBuilder
Builds/creates a newInboundHttp2ToHttpAdapter
instance using this builder's current settings. -
build
protected InboundHttp2ToHttpAdapter build(Http2Connection connection, int maxContentLength, boolean validateHttpHeaders, boolean propagateSettings) throws Exception Description copied from class:AbstractInboundHttp2ToHttpAdapterBuilder
Creates a newInboundHttp2ToHttpAdapter
with the specified properties.- Specified by:
build
in classAbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter,
InboundHttp2ToHttpAdapterBuilder> - Throws:
Exception
-