Class AbstractInboundHttp2ToHttpAdapterBuilder<T extends InboundHttp2ToHttpAdapter, B extends AbstractInboundHttp2ToHttpAdapterBuilder<T,B> >
java.lang.Object
io.netty.handler.codec.http2.AbstractInboundHttp2ToHttpAdapterBuilder<T,B>
- Direct Known Subclasses:
InboundHttp2ToHttpAdapterBuilder
public abstract class AbstractInboundHttp2ToHttpAdapterBuilder<T extends InboundHttp2ToHttpAdapter, B extends AbstractInboundHttp2ToHttpAdapterBuilder<T,B>>
extends Object
A skeletal builder implementation of
InboundHttp2ToHttpAdapter and its subtypes.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a newInboundHttp2ToHttpAdapterbuilder for the specifiedHttp2Connection. -
Method Summary
Modifier and TypeMethodDescriptionprotected Tbuild()Builds/creates a newInboundHttp2ToHttpAdapterinstance using this builder's current settings.protected abstract Tbuild(Http2Connection connection, int maxContentLength, boolean validateHttpHeaders, boolean propagateSettings) Creates a newInboundHttp2ToHttpAdapterwith the specified properties.protected 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 BmaxContentLength(int maxContentLength) Specifies the maximum length of the message content.protected BpropagateSettings(boolean propagate) Specifies whether a read settings frame should be propagated along the channel pipeline.protected final Bself()protected BvalidateHttpHeaders(boolean validate) Specifies whether validation of HTTP headers should be performed.
-
Constructor Details
-
AbstractInboundHttp2ToHttpAdapterBuilder
Creates a newInboundHttp2ToHttpAdapterbuilder for the specifiedHttp2Connection.- Parameters:
connection- the object which will provide connection notification events for the current connection
-
-
Method Details
-
self
-
connection
Returns theHttp2Connection. -
maxContentLength
protected int maxContentLength()Returns the maximum length of the message content. -
maxContentLength
Specifies the maximum length of the message content.- 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
-
isValidateHttpHeaders
protected boolean isValidateHttpHeaders()Returntrueif HTTP header validation should be performed. -
validateHttpHeaders
Specifies whether validation of HTTP headers should be performed.- Parameters:
validate-trueto validate HTTP headers in the http-codecfalsenot to validate HTTP headers in the http-codec
- Returns:
AbstractInboundHttp2ToHttpAdapterBuilderthe builder for theInboundHttp2ToHttpAdapter
-
isPropagateSettings
protected boolean isPropagateSettings()Returnstrueif a read settings frame should be propagated along the channel pipeline. -
propagateSettings
Specifies whether a read settings frame should be propagated along the channel pipeline.- 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
Builds/creates a newInboundHttp2ToHttpAdapterinstance using this builder's current settings. -
build
protected abstract T build(Http2Connection connection, int maxContentLength, boolean validateHttpHeaders, boolean propagateSettings) throws Exception Creates a newInboundHttp2ToHttpAdapterwith the specified properties.- Throws:
Exception
-