Class ConfigProducer


  • @Dependent
    public class ConfigProducer
    extends Object
    Class that provides a couple of basic producer methods used for injection of Config and the injection of Optional properties.
    Author:
    Steve Millidge
    • Constructor Detail

      • ConfigProducer

        public ConfigProducer()
    • Method Detail

      • postConstruct

        @PostConstruct
        public void postConstruct()
      • getConfig

        @Produces
        public org.eclipse.microprofile.config.Config getConfig()
        Producer method for the application config
        Returns:
        The Config object registered for this application
      • getSetProperty

        @Produces
        public <T> Set<T> getSetProperty​(jakarta.enterprise.inject.spi.InjectionPoint ip)
        Producer method for Sets
        Type Parameters:
        T - Type
        Parameters:
        ip - Injection Point
        Returns:
      • getListProperty

        @Produces
        public <T> List<T> getListProperty​(jakarta.enterprise.inject.spi.InjectionPoint ip)
        Producer method for Lists
        Type Parameters:
        T - Type
        Parameters:
        ip - Injection Point
        Returns:
      • getOptionalProperty

        @Produces
        public <T> Optional<T> getOptionalProperty​(jakarta.enterprise.inject.spi.InjectionPoint ip)
        Produces an Optional for the property specified by the ConfigProperty and of the type specified
        Type Parameters:
        T -
        Parameters:
        ip -
        Returns:
      • getPropertySupplier

        @Produces
        public <T> Supplier<T> getPropertySupplier​(jakarta.enterprise.inject.spi.InjectionPoint ip)
        Produces an Supplier for the property specified by the ConfigProperty and of the type specified
        Type Parameters:
        T -
        Parameters:
        ip -
        Returns: