Package io.muserver

Class Http2ConfigBuilder

    • Constructor Detail

      • Http2ConfigBuilder

        public Http2ConfigBuilder()
    • Method Detail

      • enabled

        public Http2ConfigBuilder enabled​(boolean enabled)
        Specifies whether to enable HTTP2 or not.
        Parameters:
        enabled - true to enable; false to disable.
        Returns:
        This builder
      • enabled

        public boolean enabled()
        Returns:
        The current value of this property
      • build

        public Http2Config build()
        Creates the HTTP2 settings object
        Returns:
        A new Http2Config object
      • http2Config

        public static Http2ConfigBuilder http2Config()
        Creates a new config where HTTP2 is disabled
        Returns:
        A new builder
      • http2Enabled

        public static Http2ConfigBuilder http2Enabled()
        Creates a new config where HTTP2 is enabled
        Returns:
        A new builder
      • http2EnabledIfAvailable

        public static Http2ConfigBuilder http2EnabledIfAvailable()

        Creates a new config where HTTP2 is enabled if supported by the Java version.

        The current logic may not always return the correct results. It does not actually test for availability and instead tries to detect the Java version, and enables HTTP2 for Java 9 or later.

        Returns:
        A new builder