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
-
public final class InboundHttp2ToHttpAdapterBuilder extends AbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter,InboundHttp2ToHttpAdapterBuilder>
Builds anInboundHttp2ToHttpAdapter.
-
-
Constructor Summary
Constructors Constructor Description InboundHttp2ToHttpAdapterBuilder(Http2Connection connection)Creates a newInboundHttp2ToHttpAdapterbuilder for the specifiedHttp2Connection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InboundHttp2ToHttpAdapterbuild()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.InboundHttp2ToHttpAdapterBuildermaxContentLength(int maxContentLength)Specifies the maximum length of the message content.InboundHttp2ToHttpAdapterBuilderpropagateSettings(boolean propagate)Specifies whether a read settings frame should be propagated along the channel pipeline.InboundHttp2ToHttpAdapterBuildervalidateHttpHeaders(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 Detail
-
InboundHttp2ToHttpAdapterBuilder
public InboundHttp2ToHttpAdapterBuilder(Http2Connection connection)
Creates a newInboundHttp2ToHttpAdapterbuilder for the specifiedHttp2Connection.- Parameters:
connection- the object which will provide connection notification events for the current connection
-
-
Method Detail
-
maxContentLength
public InboundHttp2ToHttpAdapterBuilder maxContentLength(int 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
public InboundHttp2ToHttpAdapterBuilder validateHttpHeaders(boolean validate)
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
public InboundHttp2ToHttpAdapterBuilder propagateSettings(boolean propagate)
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
public InboundHttp2ToHttpAdapter 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 java.lang.Exception
Description copied from class:AbstractInboundHttp2ToHttpAdapterBuilderCreates a newInboundHttp2ToHttpAdapterwith the specified properties.- Specified by:
buildin classAbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter,InboundHttp2ToHttpAdapterBuilder>- Throws:
java.lang.Exception
-
-