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 Details

    • SupplierFactoryInterceptionWrapper

      protected SupplierFactoryInterceptionWrapper(Supplier<T> delegate)
      Creates a new instance delegating service instantiation to the provided supplier.
      Parameters:
      delegate - used to obtain service instance that will be wrapped for interception
  • Method Details

    • get

      public T get()
      Specified by:
      get in interface Supplier<T>
    • 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

      protected abstract T wrap(T originalInstance)
      Wrap the instance for interception. This method is code generated.
      Parameters:
      originalInstance - instance to wrap
      Returns:
      wrapped instance