Interface Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>

Type Parameters:
BUILDER - type of the builder
PROTOTYPE - type of the prototype to be built
All Superinterfaces:
Prototype.Builder<BUILDER,PROTOTYPE>
Enclosing class:
Prototype

public static interface Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE> extends Prototype.Builder<BUILDER,PROTOTYPE>
Extension of Prototype.Builder that supports configuration. If a blueprint is marked as @Configured, build will accept configuration.
  • Method Details

    • config

      BUILDER config(Config config)
      Update builder from configuration. Any configured option that is defined on this prototype will be checked in configuration, and if it exists, it will override current value for that option on this builder. Options that do not exist in the provided config will not impact current values. The config instance is kept and may be used in builder interceptor, it is not available in prototype implementation.
      Parameters:
      config - configuration to use
      Returns:
      updated builder instance
    • discoverServices

      default <S extends NamedService, T extends ConfiguredProvider<S>> List<S> discoverServices(Config config, HelidonServiceLoader<T> serviceLoader, Class<T> providerType, Class<S> configType, boolean allFromServiceLoader)
      Discover services from configuration.
      Type Parameters:
      S - type of the expected service
      T - type of the configured service provider that creates instances of S
      Parameters:
      config - configuration located at the node of the service providers (either a list node, or object, where each child is one service)
      serviceLoader - helidon service loader for the expected type
      providerType - type of the service provider interface
      configType - type of the configured service
      allFromServiceLoader - whether all services from service loader should be used, or only the ones with configured node
      Returns:
      list of discovered services