public class MultiFileConfigurationBuilderProvider extends BaseConfigurationBuilderProvider
A specialized ConfigurationBuilderProvider
implementation for
integrating MultiFileConfigurationBuilder
with
CombinedConfigurationBuilder
.
When using a configuration source managed by
MultiFileConfigurationBuilder
it is not sufficient to store the
configuration once obtained from the builder in the resulting combined
configuration. Rather, it has to be ensured that each access to this
configuration queries the builder anew so that it can evaluate its file
pattern and return a different configuration if necessary. Therefore, this
class returns a specialized wrapper over a
MultiFileConfigurationBuilder
which returns a configuration wrapping
the builder; so accessing the configuration's properties actually calls back
to the builder. This constellation is compatible with the way
DynamicCombinedConfiguration
manages its data.
Constructor and Description |
---|
MultiFileConfigurationBuilderProvider(String configCls,
String paramCls)
Creates a new instance of
MultiFileConfigurationBuilderProvider
and sets the name of the configuration class to be returned by
MultiFileConfigurationBuilder . |
Modifier and Type | Method and Description |
---|---|
ConfigurationBuilder<? extends Configuration> |
getConfigurationBuilder(ConfigurationDeclaration decl)
Returns the builder for the configuration source managed by this
provider.
|
configureBuilder, createBuilder, createParameterObjects, determineBuilderClass, determineConfigurationClass, getBuilderClass, getConfigurationClass, getParameterClasses, getReloadingBuilderClass, inheritParentBuilderProperties, initializeParameterObjects, isAllowFailOnInit
public MultiFileConfigurationBuilderProvider(String configCls, String paramCls)
MultiFileConfigurationBuilderProvider
and sets the name of the configuration class to be returned by
MultiFileConfigurationBuilder
.configCls
- the name of the managed configuration classparamCls
- the name of the class of the parameters object to
configure the managed configurationpublic ConfigurationBuilder<? extends Configuration> getConfigurationBuilder(ConfigurationDeclaration decl) throws ConfigurationException
BeanDeclaration
. This implementation lets the super class create a fully
configured builder. Then it returns a special wrapper around it.getConfigurationBuilder
in interface ConfigurationBuilderProvider
getConfigurationBuilder
in class BaseConfigurationBuilderProvider
decl
- the bean declaration with initialization parameters for the
configuration builderConfigurationBuilder
object created by this providerConfigurationException
- if an error occursCopyright © 2001–2020 The Apache Software Foundation. All rights reserved.