Interface ServiceRegistryConfig

All Superinterfaces:
Prototype.Api
All Known Implementing Classes:
ServiceRegistryConfig.BuilderBase.ServiceRegistryConfigImpl

public interface ServiceRegistryConfig extends Prototype.Api
Helidon service registry configuration.
See Also:
  • Method Details

    • builder

      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      Create a new fluent API builder from an existing instance.
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • create

      static ServiceRegistryConfig create(Config config)
      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • create

      static ServiceRegistryConfig create()
      Create a new instance with default values.
      Returns:
      a new instance
    • discoverServices

      boolean discoverServices()
      Whether to discover services from the class path. When set to false, only services added through serviceDescriptors() and/or serviceInstances() would be available.
      Returns:
      whether to discover services from classpath, defaults to true
    • discoverServicesFromServiceLoader

      boolean discoverServicesFromServiceLoader()
      Whether to discover services from Java service loader. See ServiceDiscovery.SERVICES_LOADER_RESOURCE.
      Returns:
      whether to discover Java ServiceLoader services from classpath (a curated list only), defaults to true
    • serviceDescriptors

      List<GeneratedService.Descriptor<?>> serviceDescriptors()
      Manually registered service descriptors to add to the registry. This is useful when discoverServices() is set to false, to register only hand-picked services into the registry.

      Even when service discovery is used, this can be used to add service descriptors that are not part of a service discovery mechanism (such as testing services).

      Returns:
      services to register
    • serviceInstances

      Map<GeneratedService.Descriptor<?>,Object> serviceInstances()
      Manually register initial bindings for some of the services in the registry.
      Returns:
      service instances to register
    • config

      Optional<Config> config()
      Config instance used to configure this registry configuration. DO NOT USE for application configuration!
      Returns:
      config node used to configure this service registry config instance (if any)