当前位置: 首页>>代码示例>>Java>>正文


Java MetadataProviderException类代码示例

本文整理汇总了Java中com.lightstreamer.interfaces.metadata.MetadataProviderException的典型用法代码示例。如果您正苦于以下问题:Java MetadataProviderException类的具体用法?Java MetadataProviderException怎么用?Java MetadataProviderException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MetadataProviderException类属于com.lightstreamer.interfaces.metadata包,在下文中一共展示了MetadataProviderException类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import com.lightstreamer.interfaces.metadata.MetadataProviderException; //导入依赖的package包/类
@Override
public void init(Map params, File configDir) throws MetadataProviderException {
    String logConfig = (String) params.get("log_config");
    if (logConfig != null) {
        File logConfigFile = new File(configDir, logConfig);
        String logRefresh = (String) params.get("log_config_refresh_seconds");
        if (logRefresh != null) {
            DOMConfigurator.configureAndWatch(logConfigFile.getAbsolutePath(), Integer.parseInt(logRefresh) * 1000);
        } else {
            DOMConfigurator.configure(logConfigFile.getAbsolutePath());
        }
    } //else the bridge to logback is expected
    
    logger = Logger.getLogger(Constants.LOGGER_CAT);
    
    // Read the Adapter Set name, which is supplied by the Server as a parameter
    this.adapterSetId = (String) params.get("adapters_conf.id");
}
 
开发者ID:Lightstreamer,项目名称:BananaDarts-adapter-java,代码行数:19,代码来源:DartMetaDataAdapter.java

示例2: init

import com.lightstreamer.interfaces.metadata.MetadataProviderException; //导入依赖的package包/类
@Override
@SuppressWarnings("rawtypes") 
public void init(Map params, File configDir)
        throws MetadataProviderException {
    
    // Call super's init method to handle basic Metadata Adapter features
    super.init(params, configDir);

    String logConfig = (String) params.get("log_config");
    if (logConfig != null) {
        File logConfigFile = new File(configDir, logConfig);
        String logRefresh = (String) params.get("log_config_refresh_seconds");
        if (logRefresh != null) {
            DOMConfigurator.configureAndWatch(logConfigFile.getAbsolutePath(), Integer.parseInt(logRefresh) * 1000);
        } else {
            DOMConfigurator.configure(logConfigFile.getAbsolutePath());
        }
    }
    logger = Logger.getLogger("LS_demos_Logger.StockQuotesMetadata");

    logger.info("StockQuotesMetadataAdapter ready");
}
 
开发者ID:Lightstreamer,项目名称:Lightstreamer-example-MPNStockListMetadata-adapter-java,代码行数:23,代码来源:StockQuotesMetadataAdapter.java

示例3: init

import com.lightstreamer.interfaces.metadata.MetadataProviderException; //导入依赖的package包/类
/**
 * Reads configuration settings and sets internal constants.
 * If the setting for "search_dir" is missing, "." is assumed.
 * If the setting for "static" is missing, "Y" is assumed.
 *
 * @param  params  Can contain the configuration settings. 
 * @param  dir  Directory where the configuration file resides.
 * It is used as the base directory for the "search_dir" parameter.
 * @throws MetadataProviderException in case of configuration errors.
 */
public void init(Map params, File dir) throws MetadataProviderException {
    super.init(params, dir);

    String md = (String) params.get("search_dir");
    if (md != null) {
        myDir = new File(md);
        if (! myDir.isAbsolute()) {
            myDir = new File(dir, md);
        }
    } else {
        myDir = dir;
    }

    String s = (String) params.get("static");
    if ((s != null) && s.equalsIgnoreCase("Y")) {
        memory = new HashMap();
    } else {
        memory = null;
    }
}
 
开发者ID:Lightstreamer,项目名称:Lightstreamer-example-ReusableMetadata-adapter-java,代码行数:31,代码来源:FileBasedProvider.java

示例4: init

import com.lightstreamer.interfaces.metadata.MetadataProviderException; //导入依赖的package包/类
public void init(Map params, File configDir) throws MetadataProviderException {
    //Call super's init method to handle basic Metadata Adapter features
    super.init(params,configDir);

    String logConfig = (String) params.get("log_config");
    if (logConfig != null) {
        File logConfigFile = new File(configDir, logConfig);
        String logRefresh = (String) params.get("log_config_refresh_seconds");
        if (logRefresh != null) {
            DOMConfigurator.configureAndWatch(logConfigFile.getAbsolutePath(), Integer.parseInt(logRefresh) * 1000);
        } else {
            DOMConfigurator.configure(logConfigFile.getAbsolutePath());
        }
    }
    logger = Logger.getLogger("LS_demos_Logger.Messenger");

    // Read the Adapter Set name, which is supplied by the Server as a parameter
    this.adapterSetId = (String) params.get("adapters_conf.id");

    /*
     * Note: the IMDataAdapter instance cannot be looked for
     * here to initialize the "IMFeed" variable, because the Messenger
     * Data Adapter may not be loaded and initialized at this moment.
     * We need to wait until the first "sendMessage" occurrence;
     * then we can store the reference for later use.
     */

    logger.info("MessengerMetadataAdapter ready");
}
 
开发者ID:Lightstreamer,项目名称:Lightstreamer-example-Messenger-adapter-java,代码行数:30,代码来源:IMMetadataAdapter.java

示例5: init

import com.lightstreamer.interfaces.metadata.MetadataProviderException; //导入依赖的package包/类
@Override
public void init(Map params, File configDir) throws MetadataProviderException {
    super.init(params,configDir);
    
    String logConfig = (String) params.get("log_config");
    if (logConfig != null) {
        File logConfigFile = new File(configDir, logConfig);
        String logRefresh = (String) params.get("log_config_refresh_seconds");
        if (logRefresh != null) {
            DOMConfigurator.configureAndWatch(logConfigFile.getAbsolutePath(), Integer.parseInt(logRefresh) * 1000);
        } else {
            DOMConfigurator.configure(logConfigFile.getAbsolutePath());
        }
    }
    
    logger = Logger.getLogger("LS_demos_Logger.Move3dDemo");
    
    try{
        tracer = Logger.getLogger("LS_3DWorldDemo_Logger.tracer");
    } catch (Exception e) {
        logger.warn("Error on tracer initialization.",  e);            
    }
    
    if (params.containsKey("jmxPort")) {
        this.jmxPort = new Integer((String)params.get("jmxPort")).intValue();
    }
    logger.info("JMX Port:" + this.jmxPort);
    
    if (params.containsKey("Max_Srv_Players")) {
        maxSrvSideUsers = new Integer((String)params.get("Max_Srv_Players")).intValue();
    }
    logger.debug("Max server side users:" + maxSrvSideUsers);
    curSrvSideUsers = 0;
}
 
开发者ID:Lightstreamer,项目名称:Lightstreamer-example-3DWorld-adapter-java,代码行数:35,代码来源:Move3dMetaAdapter.java

示例6: init

import com.lightstreamer.interfaces.metadata.MetadataProviderException; //导入依赖的package包/类
public void init(Map params, File configDir) throws MetadataProviderException {
    //Call super's init method to handle basic Metadata Adapter features
    super.init(params,configDir);

    String logConfig = (String) params.get("log_config");
    if (logConfig != null) {
        File logConfigFile = new File(configDir, logConfig);
        String logRefresh = (String) params.get("log_config_refresh_seconds");
        if (logRefresh != null) {
            DOMConfigurator.configureAndWatch(logConfigFile.getAbsolutePath(), Integer.parseInt(logRefresh) * 1000);
        } else {
            DOMConfigurator.configure(logConfigFile.getAbsolutePath());
        }
    }
    logger = Logger.getLogger("LS_demos_Logger.RoundTrip");

    // Read the Adapter Set name, which is supplied by the Server as a parameter
    this.adapterSetId = (String) params.get("adapters_conf.id");

    /*
     * Note: the RoundTripDataAdapter instance cannot be looked for
     * here to initialize the "rtFeed" variable, because the RoundTrip
     * Data Adapter may not be loaded and initialized at this moment.
     * We need to wait until the first "sendMessage" occurrence;
     * then we can store the reference for later use.
     */

    logger.info("RoundTripMetadataAdapter ready");
}
 
开发者ID:Lightstreamer,项目名称:Lightstreamer-example-RoundTrip-adapter-java,代码行数:30,代码来源:RoundTripMetadataAdapter.java

示例7: init

import com.lightstreamer.interfaces.metadata.MetadataProviderException; //导入依赖的package包/类
@Override
@SuppressWarnings("rawtypes")
public void init(Map params, File configDir) throws MetadataProviderException {}
 
开发者ID:Lightstreamer,项目名称:Lightstreamer-example-FullScreenMario-adapter-java,代码行数:4,代码来源:MetadataAdapter.java


注:本文中的com.lightstreamer.interfaces.metadata.MetadataProviderException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。