public class EZBHistoric90RateProvider extends AbstractRateProvider implements LoaderService.LoaderListener
ExchangeRateProviderSpi that loads data from
the European Central Bank data feed (XML). It loads the current exchange
rates, as well as historic rates for the past 90 days. By calling
#loadHistoric() the provider loads all data up to 1999 into its
historic data cache.| Modifier and Type | Field and Description |
|---|---|
static javax.money.CurrencyUnit |
BASE_CURRENCY
Base currency of the loaded rates is always EUR.
|
LOGGER| Constructor and Description |
|---|
EZBHistoric90RateProvider()
Constructor, also loads initial data.
|
| Modifier and Type | Method and Description |
|---|---|
protected javax.money.convert.ExchangeRate |
getExchangeRateInternal(javax.money.CurrencyUnit base,
javax.money.CurrencyUnit term,
javax.money.convert.ConversionContext context) |
void |
newDataLoaded(java.lang.String data,
java.io.InputStream is)
(Re)load the given data feed.
|
getCurrencyConversion, getCurrencyConversion, getCurrencyConversion, getCurrencyConversion, getExchangeRate, getExchangeRate, getExchangeRate, getExchangeRate, getProviderContext, getReversed, isAvailable, isAvailable, isAvailable, isAvailablepublic static final javax.money.CurrencyUnit BASE_CURRENCY
public EZBHistoric90RateProvider()
throws java.net.MalformedURLException
java.net.MalformedURLExceptionpublic void newDataLoaded(java.lang.String data,
java.io.InputStream is)
newDataLoaded in interface LoaderService.LoaderListenerdata - the data item idis - the input stream for accessing the datajava.io.IOExceptionorg.xml.sax.SAXExceptionjavax.xml.parsers.ParserConfigurationExceptionprotected javax.money.convert.ExchangeRate getExchangeRateInternal(javax.money.CurrencyUnit base,
javax.money.CurrencyUnit term,
javax.money.convert.ConversionContext context)
getExchangeRateInternal in class AbstractRateProvider