Module io.netty.codec.http2
Package io.netty5.handler.codec.http2
Class InboundHttp2ToHttpAdapterBuilder
- java.lang.Object
-
- io.netty5.handler.codec.http2.AbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter,InboundHttp2ToHttpAdapterBuilder>
-
- io.netty5.handler.codec.http2.InboundHttp2ToHttpAdapterBuilder
-
@UnstableApi public final class InboundHttp2ToHttpAdapterBuilder extends AbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter,InboundHttp2ToHttpAdapterBuilder>
Builds anInboundHttp2ToHttpAdapter
.
-
-
Constructor Summary
Constructors Constructor Description InboundHttp2ToHttpAdapterBuilder(Http2Connection connection)
Creates a newInboundHttp2ToHttpAdapter
builder for the specifiedHttp2Connection
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InboundHttp2ToHttpAdapter
build()
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.InboundHttp2ToHttpAdapterBuilder
maxContentLength(int maxContentLength)
Specifies the maximum length of the message content.InboundHttp2ToHttpAdapterBuilder
propagateSettings(boolean propagate)
Specifies whether a read settings frame should be propagated along the channel pipeline.InboundHttp2ToHttpAdapterBuilder
validateHttpHeaders(boolean validate)
Specifies whether validation of HTTP headers should be performed.-
Methods inherited from class io.netty5.handler.codec.http2.AbstractInboundHttp2ToHttpAdapterBuilder
connection, isPropagateSettings, isValidateHttpHeaders, maxContentLength, self
-
-
-
-
Constructor Detail
-
InboundHttp2ToHttpAdapterBuilder
public InboundHttp2ToHttpAdapterBuilder(Http2Connection connection)
Creates a newInboundHttp2ToHttpAdapter
builder 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: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
public InboundHttp2ToHttpAdapterBuilder validateHttpHeaders(boolean validate)
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
public InboundHttp2ToHttpAdapterBuilder propagateSettings(boolean propagate)
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
public InboundHttp2ToHttpAdapter 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
-
-