Module io.helidon.service.registry
Package io.helidon.service.registry
Class GeneratedService.IpFactoryInterceptionWrapper<T>
java.lang.Object
io.helidon.service.registry.GeneratedService.IpFactoryInterceptionWrapper<T>
- Type Parameters:
T- type of the provided contract
- All Implemented Interfaces:
Service.InjectionPointFactory<T>
- Enclosing class:
GeneratedService
public abstract static class GeneratedService.IpFactoryInterceptionWrapper<T>
extends Object
implements Service.InjectionPointFactory<T>
Wrapper for generated Service factories that implement a
Service.InjectionPointFactory.-
Field Summary
Fields inherited from interface io.helidon.service.registry.Service.InjectionPointFactory
TYPE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new instance delegating service instantiation to the provided injection point factory. -
Method Summary
Modifier and TypeMethodDescriptionGet (or create) an instance of this service type for the given injection point context.Get (or create) a list of instances matching the criteria for the given injection point context.protected abstract TWrap the instance for interception.protected Service.QualifiedInstance<T> wrapQualifiedInstance(Service.QualifiedInstance<T> qualifiedInstance) Wrap a qualified instance so the actual instance is correctly intercepted.
-
Constructor Details
-
IpFactoryInterceptionWrapper
Creates a new instance delegating service instantiation to the provided injection point factory.- Parameters:
delegate- used to obtain service instances that will bewrappedfor interception
-
-
Method Details
-
list
Description copied from interface:Service.InjectionPointFactoryGet (or create) a list of instances matching the criteria for the given injection point context.- Specified by:
listin interfaceService.InjectionPointFactory<T>- Parameters:
lookup- the service query- Returns:
- the service instances matching criteria for the lookup in order of weight, or empty if none matching
-
first
Description copied from interface:Service.InjectionPointFactoryGet (or create) an instance of this service type for the given injection point context. This is logically the same as using the first element of the result from callingService.InjectionPointFactory.list(Lookup).- Specified by:
firstin interfaceService.InjectionPointFactory<T>- Parameters:
lookup- the service query- Returns:
- the best service instance matching the criteria, if any matched, with qualifiers (if any)
-
wrapQualifiedInstance
protected Service.QualifiedInstance<T> wrapQualifiedInstance(Service.QualifiedInstance<T> qualifiedInstance) Wrap a qualified instance so the actual instance is correctly intercepted.- Parameters:
qualifiedInstance- qualified instance created by appropriate factory- Returns:
- qualified instance with wrapped instance
-
wrap
Wrap the instance for interception. This method is code generated.- Parameters:
originalInstance- instance to wrap- Returns:
- wrapped instance
-