@FunctionalInterface public interface ProfileFileSupplier extends Supplier<ProfileFile>
Each call to the Supplier.get() method will result in either a new or previously supplied profile based on the
implementation's rules.
| Modifier and Type | Method and Description |
|---|---|
static ProfileFileSupplier |
aggregate(ProfileFileSupplier... suppliers)
Creates a
ProfileFileSupplier by combining the ProfileFile objects from multiple ProfileFileSuppliers. |
static ProfileFileSupplier |
defaultSupplier()
Creates a
ProfileFileSupplier capable of producing multiple profile objects by aggregating the default
credentials and configuration files as determined by ProfileFileLocation.credentialsFileLocation() abd
ProfileFileLocation.configurationFileLocation(). |
static ProfileFileSupplier |
fixedProfileFile(ProfileFile profileFile)
Creates a
ProfileFileSupplier that produces an existing profile. |
static ProfileFileSupplier |
reloadWhenModified(Path path,
ProfileFile.Type type)
Creates a
ProfileFileSupplier capable of producing multiple profile objects from a file. |
static ProfileFileSupplier defaultSupplier()
ProfileFileSupplier capable of producing multiple profile objects by aggregating the default
credentials and configuration files as determined by ProfileFileLocation.credentialsFileLocation() abd
ProfileFileLocation.configurationFileLocation(). This supplier will return a new ProfileFile instance only once
either disk file has been modified. Multiple calls to the supplier while both disk files are unchanged will return the
same object.ProfileFileSupplier that is capable of supplying a new aggregate profile when either file
has been modified.static ProfileFileSupplier reloadWhenModified(Path path, ProfileFile.Type type)
ProfileFileSupplier capable of producing multiple profile objects from a file. This supplier will
return a new ProfileFile instance only once the disk file has been modified. Multiple calls to the supplier while the
disk file is unchanged will return the same object.path - Path to the file to read from.type - The type of file. See ProfileFile.Type for possible values.ProfileFileSupplier that is capable of supplying a new profile when the file
has been modified.static ProfileFileSupplier fixedProfileFile(ProfileFile profileFile)
ProfileFileSupplier that produces an existing profile.profileFile - Profile object to supply.ProfileFileSupplier that is capable of supplying a single profile.static ProfileFileSupplier aggregate(ProfileFileSupplier... suppliers)
ProfileFileSupplier by combining the ProfileFile objects from multiple ProfileFileSuppliers. Objects are passed into ProfileFile.Aggregator.suppliers - Array of ProfileFileSupplier objects. ProfileFile objects are passed to
ProfileFile.Aggregator.addFile(ProfileFile) in the same argument order as the supplier that
generated it.ProfileFileSupplier aggregating results from the supplier objects.Copyright © 2023. All rights reserved.