Class ExternalPropertiesConfigurationFactory

java.lang.Object
org.glassfish.jersey.internal.config.ExternalPropertiesConfigurationFactory

public class ExternalPropertiesConfigurationFactory extends Object
Factory for external properties providers Offers methods to work with properties loaded from providers or just configure Jersey's Configurables with loaded properties from providers
  • Constructor Details

    • ExternalPropertiesConfigurationFactory

      public ExternalPropertiesConfigurationFactory()
  • Method Details

    • configure

      public static boolean configure(Configurable config)
      Input Configurable object shall be provided in order to be filled with all found properties
      Parameters:
      config - Input Configurable initialised object to be filled with properties
      Returns:
      true if configured false otherwise
    • configure

      public static boolean configure(BiConsumer<String,Object> config, List<ExternalConfigurationProvider> externalConfigurationProviders)
      Key Value pairs gathered by ExternalConfigurationProviders are applied to a given config. The config can be for instance (k,v) -> configurable.property(k,v) of a Configurable structure, or (k,v) -> properties.put(k,v) of a Properties structure.
      Parameters:
      config -
      externalConfigurationProviders - the providers to grab the properties from it.
      Returns:
      true if configured false otherwise.