This class implements an javax.
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 1500 days. The
provider loads all data up to 1999 into its historic data cache.
The default date is yesterday or the most recent day of week. To uses exchange rate from a specific date, you can use this way:
CurrencyUnit termCurrency = ...;
LocalDate localDate = ...;
ConversionQuery conversionQuery = ConversionQueryBuilder.of().setTermCurrency(euro).set(localDate).build();
CurrencyConversion currencyConversion = provider.getCurrencyConversion(conversionQuery);
MonetaryAmount money = ...;
MonetaryAmount result = currencyConversion.apply(money);
| Modifier and Type | Field and Description |
|---|---|
| private static final ProviderContext | CONTEXT
The |
| private static final String | DATA_ID
The data id used for the LoaderService. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| protected LoadDataInformation | getDefaultLoadData()
Implements abstract org. Gets the default data loading configuration. |
| CONTEXT | back to summary |
|---|---|
| private static final ProviderContext CONTEXT The | |
| DATA_ID | back to summary |
|---|---|
| private static final String DATA_ID The data id used for the LoaderService. | |
| ECBHistoricRateProvider | back to summary |
|---|---|
| public ECBHistoricRateProvider() | |
| getDataId | back to summary |
|---|---|
| public String getDataId() Implements abstract org.
| |
| getDefaultLoadData | back to summary |
|---|---|
| protected LoadDataInformation getDefaultLoadData() Implements abstract org. Doc from org. Gets the default data loading configuration. This configuration is used if no other is provided.
| |