Interface UsagePropertyProvider
- All Known Implementing Classes:
CommandLineUsagePropertyProvider,DefaultUsagePropertyProvider,EnvironmentVariableUsagePropertyProvider,HierarchicalUsagePropertyProvider,PropertyFileUsagePropertyProvider
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 TypeMethodDescriptionstatic UsagePropertyProvidercreate(UsagePropertyProvider... additionalProviders) Creates a new instance ofUsagePropertyProviderthat combines multiple property providers.Returns whether the Anonymous Usage Collection is disabled.getUrl()Returns the URL for the Anonymous Usage Collection endpoint.intpriority()Returns the priority of this property provider.
-
Method Details
-
getDisabled
Boolean getDisabled()Returns whether the Anonymous Usage Collection is disabled.- Returns:
trueif the collection is disabled,nullif not specified, orfalseif enabled.
-
getUrl
String getUrl()Returns the URL for the Anonymous Usage Collection endpoint.- Returns:
- The URL as a
String, ornullif 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
intrepresenting the priority of this provider.
-
create
Creates a new instance ofUsagePropertyProviderthat combines multiple property providers. The providers are sorted by their priority, with the highest priority provider checked first.- Parameters:
additionalProviders- AdditionalUsagePropertyProvidersthat should be attached to the defaultCommandLineUsagePropertyProvider,EnvironmentVariableUsagePropertyProvider,PropertyFileUsagePropertyProvider, andDefaultUsagePropertyProvider.- Returns:
- A new
UsagePropertyProviderinstance.
-