Interface ConfiguredServiceProvider<T,CB>

Type Parameters:
T - the type of this service provider manages
CB - the type of config beans that this service is configured by
All Superinterfaces:
Comparable<Weighted>, ConfigBeanMapper, InjectionPointProvider<T>, Provider<T>, ServiceProvider<T>, Weighted
All Known Implementing Classes:
AbstractConfiguredServiceProvider

public interface ConfiguredServiceProvider<T,CB> extends ServiceProvider<T>, ConfigBeanMapper
An extension to ServiceProvider that represents a config-driven service.
  • Method Details

    • serviceType

      Class<?> serviceType()
      The type of the service being managed.
      Returns:
      the service type being managed
    • configBeanType

      Class<?> configBeanType()
      The ConfigBean type that is used to configure this provider.
      Returns:
      the ConfigBean type that is used to configure this provider
    • metaConfigBeanInfo

      io.helidon.builder.config.spi.MetaConfigBeanInfo metaConfigBeanInfo()
      The meta config bean information associated with this service provider's ConfigBean.
      Returns:
      the MetaConfigBeanInfo for this config bean
    • configBeanAttributes

      Map<String,Map<String,Object>> configBeanAttributes()
      The config bean attributes for our ConfigBean. Generally this method is for internal use only. Most should use visitAttributes(CB, io.helidon.builder.AttributeVisitor<java.lang.Object>, R) instead of this method.
      Returns:
      the config bean attributes
    • toConfigBean

      CB toConfigBean(Config config)
      Builds a config bean instance using the configuration.
      Parameters:
      config - the backing configuration
      Returns:
      the generated config bean instance
    • toConfigBeanBuilder

      GeneratedConfigBeanBuilderBase toConfigBeanBuilder(Config config)
      Similar to toConfigBean(io.helidon.common.config.Config), but instead this method builds a config bean builder instance using the configuration.
      Parameters:
      config - the backing configuration
      Returns:
      the generated config bean instance
    • visitAttributes

      <R> void visitAttributes(CB configBean, AttributeVisitor<Object> visitor, R userDefinedContext)
      Visit the attributes of the config bean, calling the visitor for each attribute in the hierarchy.
      Type Parameters:
      R - the type of the user defined context
      Parameters:
      configBean - the config bean to visit
      visitor - the attribute visitor
      userDefinedContext - the optional user define context
    • toConfigBeanInstanceId

      String toConfigBeanInstanceId(CB configBean)
      Gets the internal config bean instance id for the provided config bean.
      Parameters:
      configBean - the config bean
      Returns:
      the config bean instance id
    • configBean

      Optional<CB> configBean()
      Returns the config bean associated with this managed service provider.
      Returns:
      the config bean associated with this managed service provider