- Type Parameters:
T- type of the instance
- All Superinterfaces:
Service.QualifiedInstance<T>,Supplier<T>
An instance managed by the service registry, with a subset of relevant metadata.
This type is injectable in the same manner as a regular service instance.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionContracts associated with this service instance for the lookup that produced it.scope()Scope this instance was created in.Service type responsible for creating this value, inherited fromServiceInfo.serviceType().doubleweight()Weight of this instance, inherited fromWeighted.weight().Methods inherited from interface io.helidon.service.registry.Service.QualifiedInstance
get, qualifiers
-
Field Details
-
TYPE
Type name of this interface.TypeNameis used in various APIs of service registry.
-
-
Method Details
-
contracts
Set<ResolvedType> contracts()Contracts associated with this service instance for the lookup that produced it. For factory-backed services, provided-service lookups return the provided service contracts, while provider-targeted lookups return the provider or factory contracts.- Returns:
- contracts associated with this service instance for the current lookup
-
scope
TypeName scope()Scope this instance was created in. Always the same as the scope of the associated service descriptor (ServiceDescriptor.scope(). This method may returnService.PerLookupin case no scope is defined ("Dependent" scope is not a real scope, as the instances cannot be managed, so each time an instance is injected, it is constructed, injected, post constructed, and then forgotten by the registry).- Returns:
- scope of this service instance
-
weight
double weight()Weight of this instance, inherited fromWeighted.weight().- Returns:
- weight
-
serviceType
TypeName serviceType()Service type responsible for creating this value, inherited fromServiceInfo.serviceType().- Returns:
- service type
-