Class ContextFeature

java.lang.Object
io.helidon.webserver.context.ContextFeature
All Implemented Interfaces:
io.helidon.builder.api.RuntimeType.Api<ContextFeatureConfig>, io.helidon.common.config.NamedService, io.helidon.common.Weighted, ServerFeature, Comparable<io.helidon.common.Weighted>

public class ContextFeature extends Object implements io.helidon.common.Weighted, ServerFeature, io.helidon.builder.api.RuntimeType.Api<ContextFeatureConfig>
Adds Context support to Helidon WebServer. When added to the processing, further processing will be executed in a request specific context.
  • Field Details

    • WEIGHT

      public static final double WEIGHT
      Default weight of the feature. It is quite high, as context is used by a lot of other features.
      See Also:
  • Method Details

    • builder

      public static ContextFeatureConfig.Builder builder()
      Fluent API builder to set up an instance.
      Returns:
      a new builder
    • create

      public static ContextFeature create(ContextFeatureConfig config)
      Create a new instance from its configuration.
      Parameters:
      config - configuration
      Returns:
      a new feature
    • create

      public static ContextFeature create(Consumer<ContextFeatureConfig.Builder> builderConsumer)
      Create a new instance customizing its configuration.
      Parameters:
      builderConsumer - consumer of configuration
      Returns:
      a new feature
    • create

      public static ContextFeature create()
      Create a new context feature with default setup.
      Returns:
      a new feature
    • create

      public static ContextFeature create(io.helidon.config.Config config)
      Create a new context feature with custom setup.
      Parameters:
      config - configuration
      Returns:
      a new configured feature
    • setup

      public void setup(ServerFeature.ServerFeatureContext featureContext)
      Specified by:
      setup in interface ServerFeature
    • name

      public String name()
      Specified by:
      name in interface io.helidon.common.config.NamedService
    • type

      public String type()
      Specified by:
      type in interface io.helidon.common.config.NamedService
    • prototype

      public ContextFeatureConfig prototype()
      Specified by:
      prototype in interface io.helidon.builder.api.RuntimeType.Api<ContextFeatureConfig>
    • weight

      public double weight()
      Specified by:
      weight in interface io.helidon.common.Weighted