Module java.money

Interface CurrencyProviderSpi


  • public interface CurrencyProviderSpi
    SPI (core) to be registered using the Bootstrap, which allows to register/provide additional currencies into the system automatically on startup. The implementation is allowed to be implemented in y contextual way, so depending on the runtime context, different currencies may be available.
    Author:
    Anatole Tresch
    • Method Detail

      • getProviderName

        default java.lang.String getProviderName()
        The unique name of this currency provider instance.
        Returns:
        the unique provider id, never null or empty.
      • isCurrencyAvailable

        default boolean isCurrencyAvailable​(CurrencyQuery query)
        Checks if a CurrencyUnit instances matching the given CurrencyContext is available from this provider.
        Parameters:
        query - the CurrencyQuery containing the parameters determining the query. not null.
        Returns:
        false, if no such unit is provided by this provider.