Class HelidonFeatureSupport.Builder<B extends HelidonFeatureSupport.Builder<B,T>,T extends HelidonFeatureSupport>

java.lang.Object
io.helidon.webserver.servicecommon.HelidonFeatureSupport.Builder<B,T>
Type Parameters:
B - type of the concrete builder for the service
T - type of the concrete service
All Implemented Interfaces:
io.helidon.common.Builder<B,T>, Supplier<T>
Enclosing class:
HelidonFeatureSupport

public abstract static class HelidonFeatureSupport.Builder<B extends HelidonFeatureSupport.Builder<B,T>,T extends HelidonFeatureSupport> extends Object implements io.helidon.common.Builder<B,T>
Abstract implementation of a Builder for the service.

Concrete implementations may override any of the Builder methods, particularly config(Config) (to load service-specific values from config into the service-specific Builder). Such overrides should invoke super.xxx(...) to take advantage of the common behavior implemented here.

  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Builder(String defaultContext)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.helidon.common.config.Config
    Returns the config (if any) assigned for this builder.
    config(io.helidon.common.config.Config config)
    Sets the configuration to be used by this builder.
    crossOriginConfig(io.helidon.cors.CrossOriginConfig crossOriginConfig)
    Set the CORS config from the specified CrossOriginConfig object.
    Sets the builder for the REST service settings.
    Set the root context for the REST API of the service.
    protected io.helidon.common.config.Config
    webContextConfig(io.helidon.common.config.Config config)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.helidon.common.Builder

    build, get, identity, update
  • Constructor Details

    • Builder

      protected Builder(String defaultContext)
  • Method Details

    • config

      public B config(io.helidon.common.config.Config config)
      Sets the configuration to be used by this builder.

      Concrete builder implementations may override this method but should invoke super.config(config) to benefit from the common routing set-up.

      Parameters:
      config - the Helidon config instance
      Returns:
      updated builder instance
    • config

      public io.helidon.common.config.Config config()
      Returns the config (if any) assigned for this builder.
      Returns:
      the Config
    • webContext

      public B webContext(String path)
      Set the root context for the REST API of the service.
      Parameters:
      path - context to use
      Returns:
      updated builder instance
    • crossOriginConfig

      public B crossOriginConfig(io.helidon.cors.CrossOriginConfig crossOriginConfig)
      Set the CORS config from the specified CrossOriginConfig object.
      Parameters:
      crossOriginConfig - CrossOriginConfig containing CORS set-up
      Returns:
      updated builder instance
    • restServiceSettings

      public B restServiceSettings(RestServiceSettings.Builder restServiceSettingsBuilder)
      Sets the builder for the REST service settings.
      Parameters:
      restServiceSettingsBuilder - builder for REST service settings
      Returns:
      updated builder
    • webContextConfig

      protected io.helidon.common.config.Config webContextConfig(io.helidon.common.config.Config config)