Package io.netty.handler.codec.quic
Class QuicServerCodecBuilder
- java.lang.Object
-
- io.netty.handler.codec.quic.QuicCodecBuilder<QuicServerCodecBuilder>
-
- io.netty.handler.codec.quic.QuicServerCodecBuilder
-
public final class QuicServerCodecBuilder extends QuicCodecBuilder<QuicServerCodecBuilder>
QuicCodecBuilderthat configures and builds aChannelHandlerthat should be added to theChannelPipelineof aQUICserver.
-
-
Constructor Summary
Constructors Constructor Description QuicServerCodecBuilder()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> QuicServerCodecBuilderattr(AttributeKey<T> key, T value)Allow to specify an initial attribute of the newly createdQuicChannel.QuicServerCodecBuilderclone()Clone the builderQuicServerCodecBuilderconnectionIdAddressGenerator(QuicConnectionIdGenerator connectionIdAddressGenerator)Sets theQuicConnectionIdGeneratorto use.QuicServerCodecBuilderhandler(ChannelHandler handler)<T> QuicServerCodecBuilderoption(ChannelOption<T> option, T value)Allow to specify aChannelOptionwhich is used for theQuicChannelinstances once they got created.QuicServerCodecBuilderresetTokenGenerator(@Nullable QuicResetTokenGenerator resetTokenGenerator)Set theQuicResetTokenGeneratorthat is used to generate stateless reset tokens ornullif the default should be used.<T> QuicServerCodecBuilderstreamAttr(AttributeKey<T> key, T value)Allow to specify an initial attribute of the newly createdQuicStreamChannel.QuicServerCodecBuilderstreamHandler(ChannelHandler streamHandler)<T> QuicServerCodecBuilderstreamOption(ChannelOption<T> option, T value)Allow to specify aChannelOptionwhich is used for theQuicStreamChannelinstances once they got created.QuicServerCodecBuildertokenHandler(@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 io.netty.handler.codec.quic.QuicCodecBuilder
ackDelayExponent, activeConnectionIdLimit, activeMigration, build, congestionControlAlgorithm, datagram, flushStrategy, grease, hystart, initialCongestionWindowPackets, initialMaxData, initialMaxStreamDataBidirectionalLocal, initialMaxStreamDataBidirectionalRemote, initialMaxStreamDataUnidirectional, initialMaxStreamsBidirectional, initialMaxStreamsUnidirectional, localConnectionIdLength, maxAckDelay, maxIdleTimeout, maxRecvUdpPayloadSize, maxSendUdpPayloadSize, self, sslContext, sslEngineProvider, sslTaskExecutor, statelessResetToken, version
-
-
-
-
Method Detail
-
clone
public QuicServerCodecBuilder 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
public <T> QuicServerCodecBuilder option(ChannelOption<T> option, @Nullable T value)
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
public <T> QuicServerCodecBuilder attr(AttributeKey<T> key, @Nullable T value)
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
public QuicServerCodecBuilder handler(ChannelHandler handler)
- Parameters:
handler- theChannelHandlerthat is added to theQuicChannelsChannelPipeline.- Returns:
- this instance.
-
streamOption
public <T> QuicServerCodecBuilder streamOption(ChannelOption<T> option, @Nullable T value)
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
public <T> QuicServerCodecBuilder streamAttr(AttributeKey<T> key, @Nullable T value)
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
public QuicServerCodecBuilder streamHandler(ChannelHandler 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
public QuicServerCodecBuilder tokenHandler(@Nullable @Nullable QuicTokenHandler 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>
-
-