Class HelidonRestServiceSupport.Builder<T extends HelidonRestServiceSupport,​B extends HelidonRestServiceSupport.Builder<T,​B>>

  • Type Parameters:
    T - type of the concrete service
    B - type of the concrete builder for the service
    All Implemented Interfaces:
    Builder<T>, Supplier<T>
    Direct Known Subclasses:
    MetricsSupport.Builder, MicrometerSupport.Builder
    Enclosing class:

    public abstract static class HelidonRestServiceSupport.Builder<T extends HelidonRestServiceSupport,​B extends HelidonRestServiceSupport.Builder<T,​B>>
    extends Object
    implements Builder<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 to take advantage of the common behavior implemented here.

    • Constructor Detail

      • Builder

        protected Builder​(Class<B> builderClass,
                          String defaultContext)
    • Method Detail

      • config

        public B 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.

        config - the Helidon config instance
        updated builder instance
      • config

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

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

        public B crossOriginConfig​(CrossOriginConfig crossOriginConfig)
        Set the CORS config from the specified CrossOriginConfig object.
        crossOriginConfig - CrossOriginConfig containing CORS set-up
        updated builder instance
      • restServiceSettings

        public B restServiceSettings​(RestServiceSettings.Builder restServiceSettingsBuilder)
        Sets the builder for the REST service settings.
        restServiceSettingsBuilder - builder for REST service settings
        updated builder
      • me

        protected B me()
        Returns correctly-typed this.
        typed "this"
      • webContextConfig

        protected Config webContextConfig​(Config config)