Package io.netty.handler.codec.http3
Class Http3
- java.lang.Object
-
- io.netty.handler.codec.http3.Http3
-
public final class Http3 extends java.lang.ObjectContains 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 QuicStreamChannelgetLocalControlStream(Channel channel)Returns the local initiated control stream for the HTTP/3 connection.static QuicClientCodecBuildernewQuicClientCodecBuilder()Returns a newQuicClientCodecBuilderthat has preconfigured for HTTP3.static QuicServerCodecBuildernewQuicServerCodecBuilder()Returns a newQuicServerCodecBuilderthat has preconfigured for HTTP3.static Future<QuicStreamChannel>newRequestStream(QuicChannel channel, ChannelHandler handler)Returns a new HTTP/3 request-stream that will use the givenChannelHandlerto dispatchHttp3RequestStreamFrames too.static QuicStreamChannelBootstrapnewRequestStreamBootstrap(QuicChannel channel, ChannelHandler handler)Returns a new HTTP/3 request-stream bootstrap that will use the givenChannelHandlerto dispatchHttp3RequestStreamFrames 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 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 QuicStreamChannelBootstrap newRequestStreamBootstrap(QuicChannel 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 java.lang.String[] supportedApplicationProtocols()
Returns the supported protocols for H3.- Returns:
- the supported protocols.
-
newQuicServerCodecBuilder
public static QuicServerCodecBuilder newQuicServerCodecBuilder()
Returns a newQuicServerCodecBuilderthat has preconfigured for HTTP3.- Returns:
- a pre-configured builder for HTTP3.
-
newQuicClientCodecBuilder
public static QuicClientCodecBuilder newQuicClientCodecBuilder()
Returns a newQuicClientCodecBuilderthat has preconfigured for HTTP3.- Returns:
- a pre-configured builder for HTTP3.
-
-