public final class QuicServerCodecBuilder extends QuicCodecBuilder<QuicServerCodecBuilder>
QuicCodecBuilder that configures and builds a ChannelHandler that should be added to the
ChannelPipeline of a QUIC server.| Constructor and Description |
|---|
QuicServerCodecBuilder()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
<T> QuicServerCodecBuilder |
attr(io.netty.util.AttributeKey<T> key,
T value)
Allow to specify an initial attribute of the newly created
QuicChannel. |
protected io.netty.channel.ChannelHandler |
build(io.netty.incubator.codec.quic.QuicheConfig config,
java.util.function.Function<QuicChannel,? extends QuicSslEngine> sslEngineProvider,
java.util.concurrent.Executor sslTaskExecutor,
int localConnIdLength,
FlushStrategy flushStrategy)
Builds the QUIC codec.
|
QuicServerCodecBuilder |
clone()
Clone the builder
|
QuicServerCodecBuilder |
connectionIdAddressGenerator(QuicConnectionIdGenerator connectionIdAddressGenerator)
Sets the
QuicConnectionIdGenerator to use. |
QuicServerCodecBuilder |
handler(io.netty.channel.ChannelHandler handler)
|
<T> QuicServerCodecBuilder |
option(io.netty.channel.ChannelOption<T> option,
T value)
Allow to specify a
ChannelOption which is used for the QuicChannel instances once they got
created. |
QuicServerCodecBuilder |
resetTokenGenerator(QuicResetTokenGenerator resetTokenGenerator)
Set the
QuicResetTokenGenerator that is used to generate stateless reset tokens or
null if the default should be used. |
<T> QuicServerCodecBuilder |
streamAttr(io.netty.util.AttributeKey<T> key,
T value)
Allow to specify an initial attribute of the newly created
QuicStreamChannel. |
QuicServerCodecBuilder |
streamHandler(io.netty.channel.ChannelHandler streamHandler)
|
<T> QuicServerCodecBuilder |
streamOption(io.netty.channel.ChannelOption<T> option,
T value)
Allow to specify a
ChannelOption which is used for the QuicStreamChannel instances once they got
created. |
QuicServerCodecBuilder |
tokenHandler(QuicTokenHandler tokenHandler)
Set the
QuicTokenHandler that is used to generate and validate tokens or
null if no tokens should be used at all. |
protected void |
validate()
Validate the configuration before building the codec.
|
ackDelayExponent, activeConnectionIdLimit, activeMigration, build, congestionControlAlgorithm, datagram, flushStrategy, grease, hystart, initialMaxData, initialMaxStreamDataBidirectionalLocal, initialMaxStreamDataBidirectionalRemote, initialMaxStreamDataUnidirectional, initialMaxStreamsBidirectional, initialMaxStreamsUnidirectional, localConnectionIdLength, maxAckDelay, maxIdleTimeout, maxRecvUdpPayloadSize, maxSendUdpPayloadSize, self, sslContext, sslEngineProvider, sslTaskExecutor, statelessResetToken, versionpublic QuicServerCodecBuilder clone()
QuicCodecBuilderclone in class QuicCodecBuilder<QuicServerCodecBuilder>public <T> QuicServerCodecBuilder option(io.netty.channel.ChannelOption<T> option, T value)
ChannelOption which is used for the QuicChannel instances once they got
created. Use a value of null to remove a previous set ChannelOption.T - the type of the value.option - the ChannelOption to apply to the QuicChannel.value - the value of the option.public <T> QuicServerCodecBuilder attr(io.netty.util.AttributeKey<T> key, T value)
QuicChannel. If the value is
null, the attribute of the specified key is removed.T - the type of the value.key - the AttributeKey to apply to the QuicChannel.value - the value of the attribute.public QuicServerCodecBuilder handler(io.netty.channel.ChannelHandler handler)
handler - the ChannelHandler that is added to the QuicChannels
ChannelPipeline.public <T> QuicServerCodecBuilder streamOption(io.netty.channel.ChannelOption<T> option, T value)
ChannelOption which is used for the QuicStreamChannel instances once they got
created. Use a value of null to remove a previous set ChannelOption.T - the type of the value.option - the ChannelOption to apply to the QuicStreamChannels.value - the value of the option.public <T> QuicServerCodecBuilder streamAttr(io.netty.util.AttributeKey<T> key, T value)
QuicStreamChannel. If the value is
null, the attribute of the specified key is removed.T - the type of the value.key - the AttributeKey to apply to the QuicStreamChannels.value - the value of the attribute.public QuicServerCodecBuilder streamHandler(io.netty.channel.ChannelHandler streamHandler)
streamHandler - the ChannelHandler that is added to the QuicStreamChannels
ChannelPipeline.public QuicServerCodecBuilder connectionIdAddressGenerator(QuicConnectionIdGenerator connectionIdAddressGenerator)
QuicConnectionIdGenerator to use.connectionIdAddressGenerator - the QuicConnectionIdGenerator to use.public QuicServerCodecBuilder tokenHandler(QuicTokenHandler tokenHandler)
QuicTokenHandler that is used to generate and validate tokens or
null if no tokens should be used at all.tokenHandler - the QuicTokenHandler to use.public QuicServerCodecBuilder resetTokenGenerator(QuicResetTokenGenerator resetTokenGenerator)
QuicResetTokenGenerator that is used to generate stateless reset tokens or
null if the default should be used.resetTokenGenerator - the QuicResetTokenGenerator to use.protected void validate()
QuicCodecBuildervalidate in class QuicCodecBuilder<QuicServerCodecBuilder>protected io.netty.channel.ChannelHandler build(io.netty.incubator.codec.quic.QuicheConfig config,
java.util.function.Function<QuicChannel,? extends QuicSslEngine> sslEngineProvider,
java.util.concurrent.Executor sslTaskExecutor,
int localConnIdLength,
FlushStrategy flushStrategy)
QuicCodecBuilderbuild in class QuicCodecBuilder<QuicServerCodecBuilder>config - the QuicheConfig that should be used.sslEngineProvider - the context providersslTaskExecutor - the Executor to use.localConnIdLength - the local connection id length.flushStrategy - the FlushStrategy that should be used.ChannelHandler which acts as codec.Copyright © 2020-2023 The Netty Project. All Rights Reserved.