Package io.netty.handler.codec.http3
Class Http3
- java.lang.Object
-
- io.netty.handler.codec.http3.Http3
-
public final class Http3 extends Object
Contains utility methods that help to bootstrap server / clients with HTTP3 support.
-
-
Field Summary
Fields Modifier and Type Field Description static intMIN_INITIAL_MAX_STREAM_DATA_UNIDIRECTIONALstatic intMIN_INITIAL_MAX_STREAMS_UNIDIRECTIONAL
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @Nullable io.netty.handler.codec.quic.QuicStreamChannelgetLocalControlStream(io.netty.channel.Channel channel)Returns the local initiated control stream for the HTTP/3 connection.static io.netty.handler.codec.quic.QuicClientCodecBuildernewQuicClientCodecBuilder()Returns a newQuicClientCodecBuilderthat has preconfigured for HTTP3.static io.netty.handler.codec.quic.QuicServerCodecBuildernewQuicServerCodecBuilder()Returns a newQuicServerCodecBuilderthat has preconfigured for HTTP3.static io.netty.util.concurrent.Future<io.netty.handler.codec.quic.QuicStreamChannel>newRequestStream(io.netty.handler.codec.quic.QuicChannel channel, io.netty.channel.ChannelHandler handler)Returns a new HTTP/3 request-stream that will use the givenChannelHandlerto dispatchHttp3RequestStreamFrames too.static io.netty.handler.codec.quic.QuicStreamChannelBootstrapnewRequestStreamBootstrap(io.netty.handler.codec.quic.QuicChannel channel, io.netty.channel.ChannelHandler handler)Returns a new HTTP/3 request-stream bootstrap that will use the givenChannelHandlerto dispatchHttp3RequestStreamFrames too.static 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 io.netty.handler.codec.quic.QuicStreamChannel getLocalControlStream(io.netty.channel.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 io.netty.util.concurrent.Future<io.netty.handler.codec.quic.QuicStreamChannel> newRequestStream(io.netty.handler.codec.quic.QuicChannel channel, io.netty.channel.ChannelHandler handler)Returns a new HTTP/3 request-stream that will use the givenChannelHandlerto dispatchHttp3RequestStreamFrames too. The needed HTTP/3 codecs are automatically added to the pipeline as well. If you need more control you can also use theHttp3RequestStreamInitializerdirectly.- Parameters:
channel- theQuicChannelfor which we create the request-stream.handler- theChannelHandlerto add.- Returns:
- the
Futurethat will be notified once the request-stream was opened.
-
newRequestStreamBootstrap
public static io.netty.handler.codec.quic.QuicStreamChannelBootstrap newRequestStreamBootstrap(io.netty.handler.codec.quic.QuicChannel channel, io.netty.channel.ChannelHandler handler)Returns a new HTTP/3 request-stream bootstrap that will use the givenChannelHandlerto dispatchHttp3RequestStreamFrames too. The needed HTTP/3 codecs are automatically added to the pipeline as well. If you need more control you can also use theHttp3RequestStreamInitializerdirectly.- Parameters:
channel- theQuicChannelfor which we create the request-stream.handler- theChannelHandlerto add.- Returns:
- the
QuicStreamChannelBootstrapthat should be used.
-
supportedApplicationProtocols
public static String[] supportedApplicationProtocols()
Returns the supported protocols for H3.- Returns:
- the supported protocols.
-
newQuicServerCodecBuilder
public static io.netty.handler.codec.quic.QuicServerCodecBuilder newQuicServerCodecBuilder()
Returns a newQuicServerCodecBuilderthat has preconfigured for HTTP3.- Returns:
- a pre-configured builder for HTTP3.
-
newQuicClientCodecBuilder
public static io.netty.handler.codec.quic.QuicClientCodecBuilder newQuicClientCodecBuilder()
Returns a newQuicClientCodecBuilderthat has preconfigured for HTTP3.- Returns:
- a pre-configured builder for HTTP3.
-
-