Class HelidonServiceLoader<T>

    • Field Detail

      • SYSTEM_PROPERTY_EXCLUDE

        public static final String SYSTEM_PROPERTY_EXCLUDE
        System property used to exclude some implementation from the list of services that are configured for Java Service loader or services that are registered using HelidonServiceLoader.Builder.
        See Also:
        Constant Field Values
    • Method Detail

      • builder

        public static <T> HelidonServiceLoader.Builder<T> builder​(ServiceLoader<T> serviceLoader)
        Create a builder for customizable service loader.
        Type Parameters:
        T - type of the service
        Parameters:
        serviceLoader - the Java Service loader used to get service implementations
        Returns:
        a new fluent API builder
      • create

        public static <T> HelidonServiceLoader<T> create​(ServiceLoader<T> serviceLoader)
        Create a prioritized service loader from a Java Service loader.
        Type Parameters:
        T - type of the service
        Parameters:
        serviceLoader - the Java service loader
        Returns:
        service loader with exclusions defined by system properties and no custom services
      • asList

        public List<T> asList()
        Provides a list of service implementations in prioritized order.
        Returns:
        list of service implementations