org.eclipse.stardust.common.config
Interface GlobalParametersProviderFactory


@SPI(status=Stable,
     useRestriction=Public)
public interface GlobalParametersProviderFactory

Provides a means to inject configuration properties during engine bootstrap.

The most prominent source of such configuration properties is carnot.properties . Using this extension point allows to contribute configuration properties from different sources, like a database, other property files from the classpath or even computed values like random hashes.

While (re-)initializing the engine, all provider factories are discovered and sorted with increasing priority. The resulting list of factories is then traversed to obtain one provider per factory. Each provider, in turn, will be asked for its set of properties, which will all be merged into GlobalParameters.

Providers with higher priority may overwrite values from previous providers by either yielding a new value for a given key or by yielding null to remove a property.


Method Summary
 int getPriority()
           
 PropertyProvider getPropertyProvider()
           
 

Method Detail

getPriority

int getPriority()
Returns:
The priority of the associated provider. Providers are consulted in increasing order, thus a provider with priority 10 might override override values yielded by another provider with priority 1.

carnot.properties will be fetched with priority 1.


getPropertyProvider

PropertyProvider getPropertyProvider()
Returns:
The associated property provider.

Its up to the factory to decide if instantiates a new provider instance per request or uses some kind of caching / singleton.



Copyright © 2017 Eclipse Stardust. All Rights Reserved.