java.lang.Object
io.helidon.service.registry.RegistryBuilderSupport
Methods used from generated code in builders when the service registry (without Config) is used.
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> Optional<T> service(Optional<ServiceRegistry> registry, TypeName contract, Optional<T> existingValue, boolean useRegistry) Get the first service from the registry if not configured in the builder.static <T> Optional<T> service(Optional<ServiceRegistry> registry, TypeName contract, Optional<T> existingValue, boolean useRegistry, Optional<String> namedQualifier) Retrieves the first matching service based on the provided contract, qualifiers, and the current configuration.static <T> List<T> serviceList(Optional<ServiceRegistry> registry, TypeName contract, boolean useRegistry) Discover services from the registry.static <T> List<T> serviceList(Optional<ServiceRegistry> registry, TypeName contract, boolean useRegistry, Optional<String> namedQualifier) Discover services from the registry.static <T> Set<T> serviceSet(Optional<ServiceRegistry> registry, TypeName contract, boolean useRegistry) Discover services from the registry.static <T> Set<T> serviceSet(Optional<ServiceRegistry> registry, TypeName contract, boolean useRegistry, Optional<String> namedQualifier) Discover services from the registry.
- 
Method Details- 
serviceListpublic static <T> List<T> serviceList(Optional<ServiceRegistry> registry, TypeName contract, boolean useRegistry) Discover services from the registry.- Type Parameters:
- T- type of the contract
- Parameters:
- registry- service registry to use, if provided explicitly
- contract- contract that is requested
- useRegistry- whether to use the service registry at all
- Returns:
- a list of contract implementation from the registry
 
- 
serviceListpublic static <T> List<T> serviceList(Optional<ServiceRegistry> registry, TypeName contract, boolean useRegistry, Optional<String> namedQualifier) Discover services from the registry.- Type Parameters:
- T- type of the contract
- Parameters:
- registry- service registry to use, if provided explicitly
- contract- contract that is requested
- useRegistry- whether to use the service registry at all
- namedQualifier- an optional qualifier name to filter the services
- Returns:
- a list of contract implementation from the registry
 
- 
serviceSetpublic static <T> Set<T> serviceSet(Optional<ServiceRegistry> registry, TypeName contract, boolean useRegistry) Discover services from the registry.- Type Parameters:
- T- type of the contract
- Parameters:
- registry- service registry to use, if provided explicitly
- contract- contract that is requested
- useRegistry- whether to use the service registry at all
- Returns:
- a set of contract implementation
 
- 
serviceSetpublic static <T> Set<T> serviceSet(Optional<ServiceRegistry> registry, TypeName contract, boolean useRegistry, Optional<String> namedQualifier) Discover services from the registry.- Type Parameters:
- T- type of the contract
- Parameters:
- registry- service registry to use, if provided explicitly
- contract- contract that is requested
- useRegistry- whether to use the service registry at all
- namedQualifier- an optional qualifier name to filter the services
- Returns:
- a set of contract implementation
 
- 
servicepublic static <T> Optional<T> service(Optional<ServiceRegistry> registry, TypeName contract, Optional<T> existingValue, boolean useRegistry) Get the first service from the registry if not configured in the builder.- Type Parameters:
- T- type of the contract
- Parameters:
- registry- service registry to use, if provided explicitly
- contract- contract that is requested
- existingValue- current values configured on the builder
- useRegistry- whether to use the service registry at all
- Returns:
- a list of contract implementation, combined from what user provided in builder and what was discovered in registry
 
- 
servicepublic static <T> Optional<T> service(Optional<ServiceRegistry> registry, TypeName contract, Optional<T> existingValue, boolean useRegistry, Optional<String> namedQualifier) Retrieves the first matching service based on the provided contract, qualifiers, and the current configuration. Allows for combining explicitly configured values with discovered values from a registry.- Type Parameters:
- T- the type of the service contract
- Parameters:
- registry- an optional service registry to use, if explicitly provided
- contract- the contract that is requested
- existingValue- an optional existing value, to be used if already present
- useRegistry- a flag indicating whether to use the service registry
- namedQualifier- an optional qualifier name to filter the services
- Returns:
- an optional containing the matching service, if found
 
 
-