Class HttpSettings

java.lang.Object
io.vertx.core.http.HttpSettings
Direct Known Subclasses:
Http2Settings, Http3Settings

public abstract class HttpSettings extends Object
Base container for HTTP settings.
Author:
Julien Viet
  • Method Details

    • copy

      public abstract HttpSettings copy()
    • set

      public <T> HttpSettings set(HttpSetting<T> setting, T value)
      Set the setting value with <T>.
      Parameters:
      setting - the setting
      value - the java value
      Returns:
      a reference to this, so the API can be used fluently
    • get

      public <T> T get(HttpSetting<T> setting)
      Get the setting value as <T>.
      Parameters:
      setting - the setting
      Returns:
      the value or null if the value is not present
    • getOrDefault

      public <T> T getOrDefault(HttpSetting<T> setting)
      Get the setting value as <T>.
      Parameters:
      setting - the setting
      Returns:
      the value, which is never null since the setting default value will be returned instead
    • setLong

      public HttpSettings setLong(HttpSetting<?> setting, long value)
      Set the setting value with long.
      Parameters:
      setting - the setting
      value - the raw value
      Returns:
      a reference to this, so the API can be used fluently
    • getLongOrDefault

      public long getLongOrDefault(HttpSetting<?> setting)
      Get the setting value as long.
      Parameters:
      setting - the setting
      Returns:
      the raw value, it could be the default value
    • getLong

      public Long getLong(HttpSetting<?> setting)
      Get the setting value as a Long.
      Parameters:
      setting - the setting
      Returns:
      the raw value or null when the value is not set