Interface DynamicConfigurationFactory
- All Known Implementing Classes:
DirectoryDynamicConfigurationFactory
,MergingDynamicConfigurationFactory
public interface DynamicConfigurationFactory
Interface for classes which create
DynamicConfiguration
instances. The factory enables dynamic configurations where the definition
of the dynamic configuration, namely its source builders and triggers vary
based on data available at runtime.
This is accomplished by creating a new dynamic configuration instance. The
specific sources and triggers included in the dynamic configuration are left
up to the specific implementation of this interface as is the interpretation
or mapping of keys.
The builder is supplied to the factory's create method in order to allow the
caller to set any non-source/trigger specific fields on the builder prior to
creation of the new dynamic configuration instance.- Author:
- Ville Koskela (ville dot koskela at inscopemetrics dot io)
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
Key descriptor. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(DynamicConfiguration.Builder builder, Collection<DynamicConfigurationFactory.Key> keys) Create a newDynamicConfiguration
from the specified builder updated with the specified keys using the strategy defined by the specific implementation.void
update
(DynamicConfiguration.Builder builder, Collection<DynamicConfigurationFactory.Key> keys) Update aDynamicConfiguration.Builder
with the specified keys using the strategy defined by the specific implementation.
-
Method Details
-
create
DynamicConfiguration create(DynamicConfiguration.Builder builder, Collection<DynamicConfigurationFactory.Key> keys) Create a newDynamicConfiguration
from the specified builder updated with the specified keys using the strategy defined by the specific implementation.- Parameters:
builder
- TheDynamicConfiguration.Builder
instance.keys
- TheCollection
ofDynamicConfigurationFactory.Key
instances.- Returns:
- New instance of
DynamicConfiguration
.
-
update
Update aDynamicConfiguration.Builder
with the specified keys using the strategy defined by the specific implementation.- Parameters:
builder
- TheDynamicConfiguration.Builder
instance.keys
- TheCollection
ofDynamicConfigurationFactory.Key
instances.
-