当前位置: 首页>>代码示例>>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;未经允许,请勿转载。