Module io.helidon.service.registry
Package io.helidon.service.registry
Class GeneratedService.SupplierFactoryInterceptionWrapper<T>
java.lang.Object
io.helidon.service.registry.GeneratedService.SupplierFactoryInterceptionWrapper<T>
- Type Parameters:
T
- type of the provided contract
- All Implemented Interfaces:
Supplier<T>
- Enclosing class:
GeneratedService
public abstract static class GeneratedService.SupplierFactoryInterceptionWrapper<T>
extends Object
implements Supplier<T>
Wrapper for generated Service factories that implement a
Supplier
of a service.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SupplierFactoryInterceptionWrapper
(Supplier<T> delegate) Creates a new instance delegating service instantiation to the provided supplier. -
Method Summary
Modifier and TypeMethodDescriptionget()
protected abstract T
Wrap 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
-
SupplierFactoryInterceptionWrapper
Creates a new instance delegating service instantiation to the provided supplier.- Parameters:
delegate
- used to obtain service instance that will bewrapped
for interception
-
-
Method Details
-
get
-
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
-