Interface UsagePropertyProvider

All Known Implementing Classes:
CommandLineUsagePropertyProvider, DefaultUsagePropertyProvider, EnvironmentVariableUsagePropertyProvider, HierarchicalUsagePropertyProvider, PropertyFileUsagePropertyProvider

@Internal public interface UsagePropertyProvider
Provides properties related to the Anonymous Usage Collection feature. This interface allows for different implementations to provide properties such as whether the collection is disabled and the URL for the collection endpoint.

To use this, please create(UsagePropertyProvider...) to obtain an instance that combines multiple property providers, such as command line, property file, and default providers.

Since:
5.0.0
Author:
Mitchell Herrijgers
  • Method Summary

    Modifier and Type
    Method
    Description
    create(UsagePropertyProvider... additionalProviders)
    Creates a new instance of UsagePropertyProvider that combines multiple property providers.
    Returns whether the Anonymous Usage Collection is disabled.
    Returns the URL for the Anonymous Usage Collection endpoint.
    int
    Returns the priority of this property provider.
  • Method Details

    • getDisabled

      Boolean getDisabled()
      Returns whether the Anonymous Usage Collection is disabled.
      Returns:
      true if the collection is disabled, null if not specified, or false if enabled.
    • getUrl

      String getUrl()
      Returns the URL for the Anonymous Usage Collection endpoint.
      Returns:
      The URL as a String, or null if not specified.
    • priority

      int priority()
      Returns the priority of this property provider. Higher values indicate higher priority. Providers with higher priority will be checked first when retrieving properties.
      Returns:
      An int representing the priority of this provider.
    • create

      static UsagePropertyProvider create(UsagePropertyProvider... additionalProviders)
      Creates a new instance of UsagePropertyProvider that combines multiple property providers. The providers are sorted by their priority, with the highest priority provider checked first.
      Parameters:
      additionalProviders - Additional UsagePropertyProviders that should be attached to the default CommandLineUsagePropertyProvider, EnvironmentVariableUsagePropertyProvider, PropertyFileUsagePropertyProvider, and DefaultUsagePropertyProvider.
      Returns:
      A new UsagePropertyProvider instance.