Class BootstrapPropertiesClientProvider<T>

java.lang.Object
org.apache.nifi.properties.configuration.BootstrapPropertiesClientProvider<T>
Type Parameters:
T - Client Type
All Implemented Interfaces:
ClientProvider<T>

public abstract class BootstrapPropertiesClientProvider<T> extends Object implements ClientProvider<T>
Shared Client Provider for reading Client Properties from file referenced in configured Bootstrap Property Key
  • Field Details

  • Constructor Details

  • Method Details

    • getClient

      public Optional<T> getClient(Properties clientProperties)
      Get Client using Client Properties
      Specified by:
      getClient in interface ClientProvider<T>
      Parameters:
      clientProperties - Client Properties can be null
      Returns:
      Configured Client or empty when Client Properties object is null
    • getClientProperties

      public Optional<Properties> getClientProperties(BootstrapProperties bootstrapProperties)
      Get Client Properties from file referenced in Bootstrap Properties
      Specified by:
      getClientProperties in interface ClientProvider<T>
      Parameters:
      bootstrapProperties - Bootstrap Properties
      Returns:
      Client Properties or empty when not configured
    • getConfiguredClient

      protected abstract T getConfiguredClient(Properties clientProperties)
      Get Configured Client using Client Properties
      Parameters:
      clientProperties - Client Properties
      Returns:
      Configured Client
    • getRequiredPropertyNames

      protected abstract Set<String> getRequiredPropertyNames()
      Get Property Names required for initializing client in order to perform initial validation
      Returns:
      Set of required client property names
    • isMissingProperties

      private boolean isMissingProperties(Properties clientProperties)