java.lang.Object
io.helidon.service.registry.RegistryBuilderSupport
Methods used from generated code in builders when service registry (without Config) is used.
-
Method Summary
Modifier 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> List
<T> serviceList
(Optional<ServiceRegistry> registry, TypeName contract, boolean useRegistry) Discover services from the registry.static <T> Set
<T> serviceSet
(Optional<ServiceRegistry> registry, TypeName contract, boolean useRegistry) Discover services from the registry.
-
Method Details
-
serviceList
public 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 explicitlycontract
- contract that is requesteduseRegistry
- whether to use the service registry at all- Returns:
- a list of contract implementation from the registry
-
serviceSet
public 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 explicitlycontract
- contract that is requesteduseRegistry
- whether to use the service registry at all- Returns:
- a set of contract implementation
-
service
public 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 explicitlycontract
- contract that is requestedexistingValue
- current values configured on the builderuseRegistry
- 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
-