Module io.helidon.service.registry
Package io.helidon.service.registry
Interface Service.QualifiedInstance<T>
- Type Parameters:
T
- type of instance, as provided by the service
- All Superinterfaces:
Supplier<T>
- All Known Subinterfaces:
ServiceInstance<T>
- Enclosing class:
Service
An instance with its qualifiers.
Some services are allowed to create more than one instance, and there may be a need
to use different qualifiers than the factory service uses.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Service.QualifiedInstance
<T> Create a new qualified instance.static <T> Service.QualifiedInstance
<T> Create a new qualified instance.get()
Get the instance that the registry manages (or an instance that is unmanaged, if the provider is inService.PerLookup
, or if the instance is created by a factory).Qualifiers of the instance.
-
Method Details
-
create
Create a new qualified instance.- Type Parameters:
T
- type of the instance- Parameters:
instance
- the instancequalifiers
- qualifiers to use- Returns:
- a new qualified instance
-
create
Create a new qualified instance.- Type Parameters:
T
- type of the instance- Parameters:
instance
- the instancequalifiers
- qualifiers to use- Returns:
- a new qualified instance
-
get
T get()Get the instance that the registry manages (or an instance that is unmanaged, if the provider is inService.PerLookup
, or if the instance is created by a factory). The instance must be guaranteed to be constructed and if managed by the registry, and activation scope is not limited, then injected as well. -
qualifiers
Qualifiers of the instance.- Returns:
- qualifiers of the service instance
-