Interface FeatureSupport

All Superinterfaces:
HttpFeature, ServerLifecycle, Supplier<HttpFeature>
All Known Implementing Classes:
HelidonFeatureSupport, MicrometerFeature, PrometheusSupport

public interface FeatureSupport extends HttpFeature
Adds support for features that require a service to be exposed. This covers configurability of the context root, CORS support etc.
  • Method Details

    • setup

      void setup(HttpRouting.Builder defaultRouting, HttpRouting.Builder featureRouting)
      Configures service endpoint on the provided routing rules. This method just adds the endpoint path (as defaulted or configured).
      Parameters:
      defaultRouting - default routing builder
      featureRouting - actual rules (if different from default) for the service endpoint
    • setup

      default void setup(HttpRouting.Builder routing)
      Configures service endpoint on the provided routing rules. This method just adds the endpoint path (as defaulted or configured).
      Specified by:
      setup in interface HttpFeature
      Parameters:
      routing - routing used to register this service
    • service

      default Optional<HttpService> service()
      If this feature is represented by a service, return it here, to simplify implementation. Otherwise you will need to implement setup(HttpRouting.Builder, HttpRouting.Builder).
      Returns:
      service if implemented
    • context

      String context()
      Web context of this service.
      Returns:
      context path to be registered
    • configuredContext

      String configuredContext()
      Web context of this service as configured (may not contain leading slash).
      Returns:
      context path exactly as configured
    • enabled

      boolean enabled()
      When a service is not enabled, it can be omitted from registration with server.
      Returns:
      true for enabled services