Class InboundHttp2ToHttpAdapterBuilder
java.lang.Object
io.netty.handler.codec.http2.AbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter, InboundHttp2ToHttpAdapterBuilder>
io.netty.handler.codec.http2.InboundHttp2ToHttpAdapterBuilder
public final class InboundHttp2ToHttpAdapterBuilder
extends AbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter, InboundHttp2ToHttpAdapterBuilder>
Builds an
InboundHttp2ToHttpAdapter.-
Constructor Summary
ConstructorsConstructorDescriptionInboundHttp2ToHttpAdapterBuilder(Http2Connection connection) Creates a newInboundHttp2ToHttpAdapterbuilder for the specifiedHttp2Connection. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds/creates a newInboundHttp2ToHttpAdapterinstance using this builder's current settings.protected InboundHttp2ToHttpAdapterbuild(Http2Connection connection, int maxContentLength, boolean validateHttpHeaders, boolean propagateSettings) Creates a newInboundHttp2ToHttpAdapterwith 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 AbstractInboundHttp2ToHttpAdapterBuilder
connection, isPropagateSettings, isValidateHttpHeaders, maxContentLength, selfModifier and TypeMethodDescriptionprotected Http2ConnectionReturns theHttp2Connection.protected booleanReturnstrueif a read settings frame should be propagated along the channel pipeline.protected booleanReturntrueif HTTP header validation should be performed.protected intReturns the maximum length of the message content.protected final InboundHttp2ToHttpAdapterBuilderself()
-
Constructor Details
-
InboundHttp2ToHttpAdapterBuilder
Creates a newInboundHttp2ToHttpAdapterbuilder for the specifiedHttp2Connection.- Parameters:
connection- the object which will provide connection notification events for the current connection
-
-
Method Details
-
maxContentLength
Description copied from class:AbstractInboundHttp2ToHttpAdapterBuilderSpecifies the maximum length of the message content.- Overrides:
maxContentLengthin classAbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter, InboundHttp2ToHttpAdapterBuilder>- Parameters:
maxContentLength- the maximum length of the message content. If the length of the message content exceeds this value, aTooLongFrameExceptionwill be raised- Returns:
AbstractInboundHttp2ToHttpAdapterBuilderthe builder for theInboundHttp2ToHttpAdapter
-
validateHttpHeaders
Description copied from class:AbstractInboundHttp2ToHttpAdapterBuilderSpecifies whether validation of HTTP headers should be performed.- Overrides:
validateHttpHeadersin classAbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter, InboundHttp2ToHttpAdapterBuilder>- Parameters:
validate-trueto validate HTTP headers in the http-codecfalsenot to validate HTTP headers in the http-codec
- Returns:
AbstractInboundHttp2ToHttpAdapterBuilderthe builder for theInboundHttp2ToHttpAdapter
-
propagateSettings
Description copied from class:AbstractInboundHttp2ToHttpAdapterBuilderSpecifies whether a read settings frame should be propagated along the channel pipeline.- Overrides:
propagateSettingsin classAbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter, InboundHttp2ToHttpAdapterBuilder>- Parameters:
propagate- iftrueread 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:
AbstractInboundHttp2ToHttpAdapterBuilderthe builder for theInboundHttp2ToHttpAdapter
-
build
Description copied from class:AbstractInboundHttp2ToHttpAdapterBuilderBuilds/creates a newInboundHttp2ToHttpAdapterinstance using this builder's current settings. -
build
protected InboundHttp2ToHttpAdapter build(Http2Connection connection, int maxContentLength, boolean validateHttpHeaders, boolean propagateSettings) throws Exception Description copied from class:AbstractInboundHttp2ToHttpAdapterBuilderCreates a newInboundHttp2ToHttpAdapterwith the specified properties.- Specified by:
buildin classAbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter, InboundHttp2ToHttpAdapterBuilder>- Throws:
Exception
-