public interface ExchangeRateProvider
Modifier and Type | Method and Description |
---|---|
double |
getExchangeRate(String sourceCurrencyCode,
String targetCurrencyCode)
Get the exchange rate between the two given currencies
|
void |
inform(ResourceLoader loader)
Passes a ResourceLoader, used to read config files from e.g.
|
void |
init(Map<String,String> args)
Initializes the provider by passing in a set of key/value configs as a map.
|
Set<String> |
listAvailableCurrencies()
List all configured currency codes which are valid as source/target for this Provider
|
boolean |
reload()
Ask the currency provider to explicitly reload/refresh its configuration.
|
double getExchangeRate(String sourceCurrencyCode, String targetCurrencyCode) throws SolrException
SolrException
- if the rate is not defined in the providerSet<String> listAvailableCurrencies()
boolean reload() throws SolrException
SolrException
- if there is a problem reloadingvoid init(Map<String,String> args)
Important: Custom config params must be removed from the map before returning
args
- a @Map of key/value config params to initialize the providervoid inform(ResourceLoader loader) throws SolrException
Typically called after init
loader
- a @ResourceLoader instanceSolrException
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.