當前位置: 首頁>>代碼示例>>Java>>正文


Java LoaderService類代碼示例

本文整理匯總了Java中org.javamoney.moneta.spi.LoaderService的典型用法代碼示例。如果您正苦於以下問題:Java LoaderService類的具體用法?Java LoaderService怎麽用?Java LoaderService使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


LoaderService類屬於org.javamoney.moneta.spi包,在下文中一共展示了LoaderService類的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: LanguageTranslations

import org.javamoney.moneta.spi.LoaderService; //導入依賴的package包/類
public LanguageTranslations(String language)
        throws MalformedURLException, URISyntaxException {
    LoaderService loader = Bootstrap.getService(LoaderService.class);

    URL backupUrl = CLDRTranslations.class.getResource(
            "java-money/defaults/cldr/main/" + language
                    + ".xml");
    URI backupURI = backupUrl == null ? null : backupUrl.toURI();
    loader.registerAndLoadData(
            "CLDR-Translations_" + language,
            UpdatePolicy.ONSTARTUP,
            new HashMap<String, String>(),
            this,
            backupURI,
            new URI("http://unicode.org/repos/cldr/trunk/common/main/"
                    + language + ".xml"));
}
 
開發者ID:JavaMoney,項目名稱:javamoney-lib,代碼行數:18,代碼來源:CLDRTranslations.java

示例2: IMFRateProvider

import org.javamoney.moneta.spi.LoaderService; //導入依賴的package包/類
public IMFRateProvider() {
    super(CONTEXT);
    LoaderService loader = Bootstrap.getService(LoaderService.class);
    loader.addLoaderListener(this, DATA_ID);
    try {
        loader.loadData(DATA_ID);
    } catch (IOException e) {
        LOGGER.log(Level.WARNING, "Error loading initial data from IMF provider...", e);
    }
}
 
開發者ID:JavaMoney,項目名稱:jsr354-ri-bp,代碼行數:11,代碼來源:IMFRateProvider.java

示例3: ECBAbstractRateProvider

import org.javamoney.moneta.spi.LoaderService; //導入依賴的package包/類
public ECBAbstractRateProvider(ProviderContext context) {
    super(context);
    saxParserFactory.setNamespaceAware(false);
    saxParserFactory.setValidating(false);
    LoaderService loader = Bootstrap.getService(LoaderService.class);
    loader.addLoaderListener(this, getDataId());
    loader.loadDataAsync(getDataId());
}
 
開發者ID:JavaMoney,項目名稱:jsr354-ri-bp,代碼行數:9,代碼來源:ECBAbstractRateProvider.java

示例4: CLDRCurrencyRegionData

import org.javamoney.moneta.spi.LoaderService; //導入依賴的package包/類
private CLDRCurrencyRegionData() throws MalformedURLException {
    Bootstrap.getService(LoaderService.class).addLoaderListener(this, "CLDR-SupplementalData");
    try {
        Bootstrap.getService(LoaderService.class).loadData("CLDR-SupplementalData");
    } catch (IOException e) {
        LOG.log(Level.SEVERE, "Error loading CLDR supplemental data.", e);
    }
}
 
開發者ID:JavaMoney,項目名稱:javamoney-lib,代碼行數:9,代碼來源:CLDRCurrencyRegionData.java

示例5: initalize

import org.javamoney.moneta.spi.LoaderService; //導入依賴的package包/類
private void initalize() {
    saxParserFactory.setNamespaceAware(false);
    saxParserFactory.setValidating(false);
    LoaderService loader = Bootstrap.getService(LoaderService.class);
    loader.addLoaderListener(this, getDataId());
    try {
        loader.loadDataAsync(getDataId());
    } catch(Exception e) {
        throw new RuntimeException(e);
    }
}
 
開發者ID:JavaMoney,項目名稱:javamoney-lib,代碼行數:12,代碼來源:USFederalReserveRateProvider.java

示例6: YahooAbstractRateProvider

import org.javamoney.moneta.spi.LoaderService; //導入依賴的package包/類
YahooAbstractRateProvider(ProviderContext context) {
      super(context);
this.context = context;
      final LoaderService loader = Bootstrap.getService(LoaderService.class);
      loader.addLoaderListener(this, getDataId());
      loader.loadDataAsync(getDataId());
  }
 
開發者ID:JavaMoney,項目名稱:javamoney-lib,代碼行數:8,代碼來源:YahooAbstractRateProvider.java

示例7: ECBAbstractRateProvider

import org.javamoney.moneta.spi.LoaderService; //導入依賴的package包/類
ECBAbstractRateProvider(ProviderContext context) {
      super(context);
this.context = context;
      saxParserFactory.setNamespaceAware(false);
      saxParserFactory.setValidating(false);
      LoaderService loader = Bootstrap.getService(LoaderService.class);
      loader.addLoaderListener(this, getDataId());
      loader.loadDataAsync(getDataId());
  }
 
開發者ID:JavaMoney,項目名稱:jsr354-ri,代碼行數:10,代碼來源:ECBAbstractRateProvider.java

示例8: IMFRateProvider

import org.javamoney.moneta.spi.LoaderService; //導入依賴的package包/類
public IMFRateProvider() {
    super(CONTEXT);
    LoaderService loader = Bootstrap.getService(LoaderService.class);
    loader.addLoaderListener(this, DATA_ID);
    try {
        loader.loadData(DATA_ID);
    } catch (IOException e) {
    	LOG.log(Level.WARNING, "Error loading initial data from IMF provider...", e);
    }
}
 
開發者ID:JavaMoney,項目名稱:jsr354-ri,代碼行數:11,代碼來源:IMFRateProvider.java

示例9: IMFHistoricRateProvider

import org.javamoney.moneta.spi.LoaderService; //導入依賴的package包/類
public IMFHistoricRateProvider() {
	super(CONTEXT);
	 LoaderService loader = Bootstrap.getService(LoaderService.class);
        loader.addLoaderListener(this, DATA_ID);
        try {
            loader.loadData(DATA_ID);
        } catch (IOException e) {
        	LOG.log(Level.WARNING, "Error loading initial data from IMF provider...", e);
        }
}
 
開發者ID:JavaMoney,項目名稱:jsr354-ri,代碼行數:11,代碼來源:IMFHistoricRateProvider.java

示例10: LoaderConfigurator

import org.javamoney.moneta.spi.LoaderService; //導入依賴的package包/類
LoaderConfigurator(LoaderService loaderService) {
    Objects.requireNonNull(loaderService);
    this.loaderService = loaderService;
}
 
開發者ID:JavaMoney,項目名稱:jsr354-ri-bp,代碼行數:5,代碼來源:LoaderConfigurator.java

示例11: shouldReadDataFromFallback

import org.javamoney.moneta.spi.LoaderService; //導入依賴的package包/類
private boolean shouldReadDataFromFallback() {
    return LoaderService.UpdatePolicy.NEVER.equals(updatePolicy) || !loadRemote();
}
 
開發者ID:JavaMoney,項目名稱:jsr354-ri-bp,代碼行數:4,代碼來源:LoadableResource.java

示例12: getUpdatePolicy

import org.javamoney.moneta.spi.LoaderService; //導入依賴的package包/類
/**
 * Get the UpdatePolicy of this resource.
 *
 * @return the UpdatePolicy of this resource, never null.
 */
public LoaderService.UpdatePolicy getUpdatePolicy() {
    return updatePolicy;
}
 
開發者ID:JavaMoney,項目名稱:jsr354-ri-bp,代碼行數:9,代碼來源:LoadableResource.java


注:本文中的org.javamoney.moneta.spi.LoaderService類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。