Class GeneratedService.ServicesFactoryInterceptionWrapper<T>

java.lang.Object
io.helidon.service.registry.GeneratedService.ServicesFactoryInterceptionWrapper<T>
Type Parameters:
T - type of the provided contract
All Implemented Interfaces:
Service.ServicesFactory<T>
Enclosing class:
GeneratedService

public abstract static class GeneratedService.ServicesFactoryInterceptionWrapper<T> extends Object implements Service.ServicesFactory<T>
Wrapper for generated Service factories that implement a Service.ServicesFactory.
  • Constructor Details

    • ServicesFactoryInterceptionWrapper

      protected ServicesFactoryInterceptionWrapper(Service.ServicesFactory<T> delegate)
      Creates a new instance delegating service instantiation to the provided services factory.
      Parameters:
      delegate - used to obtain service instances that will be wrapped for interception
  • Method Details

    • services

      public List<Service.QualifiedInstance<T>> services()
      Description copied from interface: Service.ServicesFactory
      List of service instances. Each instance may have a different set of qualifiers.

      The following is inherited from this factory:

      Specified by:
      services in interface Service.ServicesFactory<T>
      Returns:
      qualified suppliers of service instances
    • 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