Package io.netty.handler.codec.http3
Class Http3
- java.lang.Object
-
- io.netty.handler.codec.http3.Http3
-
public final class Http3 extends java.lang.Object
Contains utility methods that help to bootstrap server / clients with HTTP3 support.
-
-
Field Summary
Fields Modifier and Type Field Description static int
MIN_INITIAL_MAX_STREAM_DATA_UNIDIRECTIONAL
static int
MIN_INITIAL_MAX_STREAMS_UNIDIRECTIONAL
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @Nullable QuicStreamChannel
getLocalControlStream(Channel channel)
Returns the local initiated control stream for the HTTP/3 connection.static QuicClientCodecBuilder
newQuicClientCodecBuilder()
Returns a newQuicClientCodecBuilder
that has preconfigured for HTTP3.static QuicServerCodecBuilder
newQuicServerCodecBuilder()
Returns a newQuicServerCodecBuilder
that has preconfigured for HTTP3.static Future<QuicStreamChannel>
newRequestStream(QuicChannel channel, ChannelHandler handler)
Returns a new HTTP/3 request-stream that will use the givenChannelHandler
to dispatchHttp3RequestStreamFrame
s too.static QuicStreamChannelBootstrap
newRequestStreamBootstrap(QuicChannel channel, ChannelHandler handler)
Returns a new HTTP/3 request-stream bootstrap that will use the givenChannelHandler
to dispatchHttp3RequestStreamFrame
s too.static java.lang.String[]
supportedApplicationProtocols()
Returns the supported protocols for H3.
-
-
-
Field Detail
-
MIN_INITIAL_MAX_STREAMS_UNIDIRECTIONAL
public static final int MIN_INITIAL_MAX_STREAMS_UNIDIRECTIONAL
- See Also:
- Constant Field Values
-
MIN_INITIAL_MAX_STREAM_DATA_UNIDIRECTIONAL
public static final int MIN_INITIAL_MAX_STREAM_DATA_UNIDIRECTIONAL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLocalControlStream
@Nullable public static @Nullable QuicStreamChannel getLocalControlStream(Channel channel)
Returns the local initiated control stream for the HTTP/3 connection.- Parameters:
channel
- the channel for the HTTP/3 connection.- Returns:
- the control stream.
-
newRequestStream
public static Future<QuicStreamChannel> newRequestStream(QuicChannel channel, ChannelHandler handler)
Returns a new HTTP/3 request-stream that will use the givenChannelHandler
to dispatchHttp3RequestStreamFrame
s too. The needed HTTP/3 codecs are automatically added to the pipeline as well. If you need more control you can also use theHttp3RequestStreamInitializer
directly.- Parameters:
channel
- theQuicChannel
for which we create the request-stream.handler
- theChannelHandler
to add.- Returns:
- the
Future
that will be notified once the request-stream was opened.
-
newRequestStreamBootstrap
public static QuicStreamChannelBootstrap newRequestStreamBootstrap(QuicChannel channel, ChannelHandler handler)
Returns a new HTTP/3 request-stream bootstrap that will use the givenChannelHandler
to dispatchHttp3RequestStreamFrame
s too. The needed HTTP/3 codecs are automatically added to the pipeline as well. If you need more control you can also use theHttp3RequestStreamInitializer
directly.- Parameters:
channel
- theQuicChannel
for which we create the request-stream.handler
- theChannelHandler
to add.- Returns:
- the
QuicStreamChannelBootstrap
that should be used.
-
supportedApplicationProtocols
public static java.lang.String[] supportedApplicationProtocols()
Returns the supported protocols for H3.- Returns:
- the supported protocols.
-
newQuicServerCodecBuilder
public static QuicServerCodecBuilder newQuicServerCodecBuilder()
Returns a newQuicServerCodecBuilder
that has preconfigured for HTTP3.- Returns:
- a pre-configured builder for HTTP3.
-
newQuicClientCodecBuilder
public static QuicClientCodecBuilder newQuicClientCodecBuilder()
Returns a newQuicClientCodecBuilder
that has preconfigured for HTTP3.- Returns:
- a pre-configured builder for HTTP3.
-
-