Class QuicServerCodecBuilder
java.lang.Object
io.netty.handler.codec.quic.QuicCodecBuilder<QuicServerCodecBuilder>
io.netty.handler.codec.quic.QuicServerCodecBuilder
QuicCodecBuilder that configures and builds a ChannelHandler that should be added to the
ChannelPipeline of a QUIC server.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionattr(AttributeKey<T> key, T value) Allow to specify an initial attribute of the newly createdQuicChannel.clone()Clone the builderconnectionIdAddressGenerator(QuicConnectionIdGenerator connectionIdAddressGenerator) Sets theQuicConnectionIdGeneratorto use.handler(ChannelHandler handler) option(ChannelOption<T> option, T value) Allow to specify aChannelOptionwhich is used for theQuicChannelinstances once they got created.resetTokenGenerator(@Nullable QuicResetTokenGenerator resetTokenGenerator) Set theQuicResetTokenGeneratorthat is used to generate stateless reset tokens ornullif the default should be used.streamAttr(AttributeKey<T> key, T value) Allow to specify an initial attribute of the newly createdQuicStreamChannel.streamHandler(ChannelHandler streamHandler) streamOption(ChannelOption<T> option, T value) Allow to specify aChannelOptionwhich is used for theQuicStreamChannelinstances once they got created.tokenHandler(@Nullable QuicTokenHandler tokenHandler) Set theQuicTokenHandlerthat is used to generate and validate tokens ornullif no tokens should be used at all.protected voidvalidate()Validate the configuration before building the codec.Methods inherited from class QuicCodecBuilder
ackDelayExponent, activeConnectionIdLimit, activeMigration, build, congestionControlAlgorithm, datagram, discoverPmtu, flushStrategy, grease, hystart, initialCongestionWindowPackets, initialMaxData, initialMaxStreamDataBidirectionalLocal, initialMaxStreamDataBidirectionalRemote, initialMaxStreamDataUnidirectional, initialMaxStreamsBidirectional, initialMaxStreamsUnidirectional, localConnectionIdLength, maxAckDelay, maxIdleTimeout, maxRecvUdpPayloadSize, maxSendUdpPayloadSize, self, sslContext, sslEngineProvider, sslTaskExecutor, statelessResetToken, versionModifier and TypeMethodDescriptionfinal QuicServerCodecBuilderackDelayExponent(long value) final QuicServerCodecBuilderactiveConnectionIdLimit(long limit) Allows to configure theactive connect id limitthat should be used.final QuicServerCodecBuilderactiveMigration(boolean enable) final ChannelHandlerbuild()Builds the QUIC codec that should be added to theChannelPipelineof the underlyingChannelwhich is used as transport for QUIC.final QuicServerCodecBuildercongestionControlAlgorithm(QuicCongestionControlAlgorithm congestionControlAlgorithm) Sets the congestion control algorithm to use.final QuicServerCodecBuilderdatagram(int recvQueueLen, int sendQueueLen) If configured this will enable Datagram support.final QuicServerCodecBuilderdiscoverPmtu(boolean enable) See discover_pmtu.final QuicServerCodecBuilderflushStrategy(FlushStrategy flushStrategy) Sets theFlushStrategythat will be used to detect when an automatic flush should happen.final QuicServerCodecBuildergrease(boolean enable) Set if greasing should be enabled or not.final QuicServerCodecBuilderhystart(boolean enable) See enable_hystart.final QuicServerCodecBuilderinitialCongestionWindowPackets(int numPackets) Sets initial congestion window size in terms of packet count.final QuicServerCodecBuilderinitialMaxData(long value) See set_initial_max_data.final QuicServerCodecBuilderinitialMaxStreamDataBidirectionalLocal(long value) final QuicServerCodecBuilderinitialMaxStreamDataBidirectionalRemote(long value) final QuicServerCodecBuilderinitialMaxStreamDataUnidirectional(long value) final QuicServerCodecBuilderinitialMaxStreamsBidirectional(long value) final QuicServerCodecBuilderinitialMaxStreamsUnidirectional(long value) final QuicServerCodecBuilderlocalConnectionIdLength(int value) Sets the local connection id length that is used.final QuicServerCodecBuildermaxAckDelay(long amount, TimeUnit unit) See set_max_ack_delay.final QuicServerCodecBuildermaxIdleTimeout(long amount, TimeUnit unit) See set_max_idle_timeout.final QuicServerCodecBuildermaxRecvUdpPayloadSize(long size) final QuicServerCodecBuildermaxSendUdpPayloadSize(long size) protected final QuicServerCodecBuilderself()Returns itself.final QuicServerCodecBuildersslContext(QuicSslContext sslContext) final QuicServerCodecBuildersslEngineProvider(Function<QuicChannel, ? extends QuicSslEngine> sslEngineProvider) final QuicServerCodecBuildersslTaskExecutor(Executor sslTaskExecutor) Allow to configure aExecutorthat will be used to run expensive SSL operations.final QuicServerCodecBuilderstatelessResetToken(byte[] token) Allows to configure theactive connect id limitthat should be used.final QuicServerCodecBuilderversion(int version) Allows to configure theQUIC versionthat should be used.
-
Constructor Details
-
QuicServerCodecBuilder
public QuicServerCodecBuilder()Creates a new instance.
-
-
Method Details
-
clone
Description copied from class:QuicCodecBuilderClone the builder- Specified by:
clonein classQuicCodecBuilder<QuicServerCodecBuilder>- Returns:
- the new instance that is a clone if this instance.
-
option
Allow to specify aChannelOptionwhich is used for theQuicChannelinstances once they got created. Use a value ofnullto remove a previous setChannelOption.- Type Parameters:
T- the type of the value.- Parameters:
option- theChannelOptionto apply to theQuicChannel.value- the value of the option.- Returns:
- this instance.
-
attr
Allow to specify an initial attribute of the newly createdQuicChannel. If thevalueisnull, the attribute of the specifiedkeyis removed.- Type Parameters:
T- the type of the value.- Parameters:
key- theAttributeKeyto apply to theQuicChannel.value- the value of the attribute.- Returns:
- this instance.
-
handler
- Parameters:
handler- theChannelHandlerthat is added to theQuicChannelsChannelPipeline.- Returns:
- this instance.
-
streamOption
Allow to specify aChannelOptionwhich is used for theQuicStreamChannelinstances once they got created. Use a value ofnullto remove a previous setChannelOption.- Type Parameters:
T- the type of the value.- Parameters:
option- theChannelOptionto apply to theQuicStreamChannels.value- the value of the option.- Returns:
- this instance.
-
streamAttr
Allow to specify an initial attribute of the newly createdQuicStreamChannel. If thevalueisnull, the attribute of the specifiedkeyis removed.- Type Parameters:
T- the type of the value.- Parameters:
key- theAttributeKeyto apply to theQuicStreamChannels.value- the value of the attribute.- Returns:
- this instance.
-
streamHandler
- Parameters:
streamHandler- theChannelHandlerthat is added to theQuicStreamChannelsChannelPipeline.- Returns:
- this instance.
-
connectionIdAddressGenerator
public QuicServerCodecBuilder connectionIdAddressGenerator(QuicConnectionIdGenerator connectionIdAddressGenerator) Sets theQuicConnectionIdGeneratorto use.- Parameters:
connectionIdAddressGenerator- theQuicConnectionIdGeneratorto use.- Returns:
- this instance.
-
tokenHandler
Set theQuicTokenHandlerthat is used to generate and validate tokens ornullif no tokens should be used at all.- Parameters:
tokenHandler- theQuicTokenHandlerto use.- Returns:
- this instance.
-
resetTokenGenerator
public QuicServerCodecBuilder resetTokenGenerator(@Nullable @Nullable QuicResetTokenGenerator resetTokenGenerator) Set theQuicResetTokenGeneratorthat is used to generate stateless reset tokens ornullif the default should be used.- Parameters:
resetTokenGenerator- theQuicResetTokenGeneratorto use.- Returns:
- this instance.
-
validate
protected void validate()Description copied from class:QuicCodecBuilderValidate the configuration before building the codec.- Overrides:
validatein classQuicCodecBuilder<QuicServerCodecBuilder>
-