Module io.helidon.service.registry
Package io.helidon.service.registry
Interface ServiceRegistryConfig
- All Superinterfaces:
Prototype.Api
- All Known Implementing Classes:
ServiceRegistryConfig.BuilderBase.ServiceRegistryConfigImpl
Helidon service registry configuration.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Fluent API builder forServiceRegistryConfig
.static class
ServiceRegistryConfig.BuilderBase<BUILDER extends ServiceRegistryConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends ServiceRegistryConfig> Fluent API builder base forServiceRegistryConfig
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a new fluent API builder to customize configuration.builder
(ServiceRegistryConfig instance) Create a new fluent API builder from an existing instance.config()
Config instance used to configure this registry configuration.static ServiceRegistryConfig
create()
Create a new instance with default values.static ServiceRegistryConfig
Create a new instance from configuration.boolean
Whether to discover services from the class path.boolean
Whether to discover services from Java service loader.Manually registered service descriptors to add to the registry.Manually register initial bindings for some of the services in the registry.
-
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
Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
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 tofalse
, only services added throughserviceDescriptors()
and/orserviceInstances()
would be available.- Returns:
- whether to discover services from classpath, defaults to
true
-
discoverServicesFromServiceLoader
boolean discoverServicesFromServiceLoader()Whether to discover services from Java service loader. SeeServiceDiscovery.SERVICES_LOADER_RESOURCE
.- Returns:
- whether to discover Java
ServiceLoader
services from classpath (a curated list only), defaults totrue
-
serviceDescriptors
List<GeneratedService.Descriptor<?>> serviceDescriptors()Manually registered service descriptors to add to the registry. This is useful whendiscoverServices()
is set tofalse
, 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
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)
-