Module java.money

Class MonetaryConversions

java.lang.Object
javax.money.convert.MonetaryConversions

public final class MonetaryConversions
extends java.lang.Object
This singleton defines access to the exchange and currency conversion logic of JavaMoney. It allows to evaluate the currently available exchange rate type instances and provides access to the corresponding ExchangeRateProvider and CurrencyConversion instances.

This class is thread safe.

This class is designed to support also contextual behaviour, e.g. in Java EE containers each application may provide its own ExchangeRateProvider instances, e.g. by registering them as CDI beans. An EE container can register an according MonetaryConversionsSingletonSpi that manages the different application contexts transparently. In a SE environment this class is expected to behave like an ordinary singleton, loading its SPIs e.g. from the JDK ServiceLoader or an alternate component and service provider.

This class is thread-safe. Hereby it is important to know that it delegates to the registered MonetaryConversionsSingletonSpi SPI, which also is required to be thread-safe.

Author:
Anatole Tresch, Werner Keil