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>
QuicCodecBuilder
that configures and builds aChannelHandler
that should be added to theChannelPipeline
of aQUIC
server.
-
-
Constructor Summary
Constructors Constructor Description QuicServerCodecBuilder()
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> QuicServerCodecBuilder
attr(AttributeKey<T> key, T value)
Allow to specify an initial attribute of the newly createdQuicChannel
.QuicServerCodecBuilder
clone()
Clone the builderQuicServerCodecBuilder
connectionIdAddressGenerator(QuicConnectionIdGenerator connectionIdAddressGenerator)
Sets theQuicConnectionIdGenerator
to use.QuicServerCodecBuilder
handler(ChannelHandler handler)
<T> QuicServerCodecBuilder
option(ChannelOption<T> option, T value)
Allow to specify aChannelOption
which is used for theQuicChannel
instances once they got created.QuicServerCodecBuilder
resetTokenGenerator(@Nullable QuicResetTokenGenerator resetTokenGenerator)
Set theQuicResetTokenGenerator
that is used to generate stateless reset tokens ornull
if the default should be used.<T> QuicServerCodecBuilder
streamAttr(AttributeKey<T> key, T value)
Allow to specify an initial attribute of the newly createdQuicStreamChannel
.QuicServerCodecBuilder
streamHandler(ChannelHandler streamHandler)
<T> QuicServerCodecBuilder
streamOption(ChannelOption<T> option, T value)
Allow to specify aChannelOption
which is used for theQuicStreamChannel
instances once they got created.QuicServerCodecBuilder
tokenHandler(@Nullable QuicTokenHandler tokenHandler)
Set theQuicTokenHandler
that is used to generate and validate tokens ornull
if no tokens should be used at all.protected void
validate()
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:QuicCodecBuilder
Clone the builder- Specified by:
clone
in 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 aChannelOption
which is used for theQuicChannel
instances once they got created. Use a value ofnull
to remove a previous setChannelOption
.- Type Parameters:
T
- the type of the value.- Parameters:
option
- theChannelOption
to 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 thevalue
isnull
, the attribute of the specifiedkey
is removed.- Type Parameters:
T
- the type of the value.- Parameters:
key
- theAttributeKey
to apply to theQuicChannel
.value
- the value of the attribute.- Returns:
- this instance.
-
handler
public QuicServerCodecBuilder handler(ChannelHandler handler)
- Parameters:
handler
- theChannelHandler
that is added to theQuicChannel
sChannelPipeline
.- Returns:
- this instance.
-
streamOption
public <T> QuicServerCodecBuilder streamOption(ChannelOption<T> option, @Nullable T value)
Allow to specify aChannelOption
which is used for theQuicStreamChannel
instances once they got created. Use a value ofnull
to remove a previous setChannelOption
.- Type Parameters:
T
- the type of the value.- Parameters:
option
- theChannelOption
to apply to theQuicStreamChannel
s.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 thevalue
isnull
, the attribute of the specifiedkey
is removed.- Type Parameters:
T
- the type of the value.- Parameters:
key
- theAttributeKey
to apply to theQuicStreamChannel
s.value
- the value of the attribute.- Returns:
- this instance.
-
streamHandler
public QuicServerCodecBuilder streamHandler(ChannelHandler streamHandler)
- Parameters:
streamHandler
- theChannelHandler
that is added to theQuicStreamChannel
sChannelPipeline
.- Returns:
- this instance.
-
connectionIdAddressGenerator
public QuicServerCodecBuilder connectionIdAddressGenerator(QuicConnectionIdGenerator connectionIdAddressGenerator)
Sets theQuicConnectionIdGenerator
to use.- Parameters:
connectionIdAddressGenerator
- theQuicConnectionIdGenerator
to use.- Returns:
- this instance.
-
tokenHandler
public QuicServerCodecBuilder tokenHandler(@Nullable @Nullable QuicTokenHandler tokenHandler)
Set theQuicTokenHandler
that is used to generate and validate tokens ornull
if no tokens should be used at all.- Parameters:
tokenHandler
- theQuicTokenHandler
to use.- Returns:
- this instance.
-
resetTokenGenerator
public QuicServerCodecBuilder resetTokenGenerator(@Nullable @Nullable QuicResetTokenGenerator resetTokenGenerator)
Set theQuicResetTokenGenerator
that is used to generate stateless reset tokens ornull
if the default should be used.- Parameters:
resetTokenGenerator
- theQuicResetTokenGenerator
to use.- Returns:
- this instance.
-
validate
protected void validate()
Description copied from class:QuicCodecBuilder
Validate the configuration before building the codec.- Overrides:
validate
in classQuicCodecBuilder<QuicServerCodecBuilder>
-
-