public class ECBCurrentRateProvider extends AbstractRateProvider
ExchangeRateProvider
that loads data from
the European Central Bank data feed (XML). It loads the current exchange
rates. 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 |
---|
ECBCurrentRateProvider() |
Modifier and Type | Method and Description |
---|---|
String |
getDataId() |
javax.money.convert.ExchangeRate |
getExchangeRate(javax.money.convert.ConversionQuery query) |
void |
newDataLoaded(String data,
InputStream is)
Callback called from the
LoaderService , when new data was
read for a given data item. |
divide, divide, getContext, getCurrencyConversion, multiply
public static final javax.money.CurrencyUnit BASE_CURRENCY
public ECBCurrentRateProvider() throws MalformedURLException
MalformedURLException
public void newDataLoaded(String data, InputStream is)
LoaderService.LoaderListener
LoaderService
, when new data was
read for a given data item.newDataLoaded
in interface LoaderService.LoaderListener
data
- the resource idis
- the input stream for accessing the datapublic javax.money.convert.ExchangeRate getExchangeRate(javax.money.convert.ConversionQuery query)
getExchangeRate
in interface javax.money.convert.ExchangeRateProvider
getExchangeRate
in class AbstractRateProvider
Copyright © 2012-2015 JavaMoney. All Rights Reserved.