Enum Class Feature

java.lang.Object
java.lang.Enum<Feature>
io.kroxylicious.proxy.internal.config.Feature
All Implemented Interfaces:
Serializable, Comparable<Feature>, Constable

public enum Feature extends Enum<Feature>
Configuration Features related to how we load configuration.
  • Enum Constant Details

    • ROUTING

      public static final Feature ROUTING
      Enables the routing API (routers, routes, and multi-cluster request dispatch). This is a preview feature: the API has no compatibility guarantees and may change or be removed in a future release. Unlock with: KROXYLICIOUS_UNLOCK_ROUTING=true
    • TEST_ONLY_CONFIGURATION

      public static final Feature TEST_ONLY_CONFIGURATION
      Enables loading specific nodes in the configuration file which configure test-only features. These are unsupported for production usages and there are no compatibility guarantees for their configuration model.
  • Method Details

    • values

      public static Feature[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Feature valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • supports

      public abstract Stream<String> supports(Configuration configuration, boolean enabled)
      Check if a configuration is supported by this feature
      Parameters:
      configuration - proxy configuration
      enabled - true if this feature is enabled
      Returns:
      a stream of error messages, a non-empty stream indicates the configuration is unsupported
    • enabledByDefault

      public boolean enabledByDefault()
    • maybeWarning

      public abstract Optional<String> maybeWarning(boolean enabled)
      At proxy initialisation time, this method will be invoked to give the feature an opportunity to log any disclaimers.
      Parameters:
      enabled - true if this feature is enabled