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


Java RConnection.shutdown方法代码示例

本文整理汇总了Java中org.rosuda.REngine.Rserve.RConnection.shutdown方法的典型用法代码示例。如果您正苦于以下问题:Java RConnection.shutdown方法的具体用法?Java RConnection.shutdown怎么用?Java RConnection.shutdown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.rosuda.REngine.Rserve.RConnection的用法示例。


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

示例1: tearDown

import org.rosuda.REngine.Rserve.RConnection; //导入方法依赖的package包/类
@PreDestroy
public void tearDown() {
	try {
		if(LOGGER.isInfoEnabled()) {
			LOGGER.info("Shuting down Rserve daemon....");
		}
		RConnection rConnection = rConnectionFactory.getConnection();
		rConnection.shutdown();
		rConnectionFactory.releaseConnection(rConnection);
		if(LOGGER.isInfoEnabled()) {
			LOGGER.info("Shutdown signal sent to Rserve daemon");
		}
	} catch(Exception e) {
		LOGGER.error("Unexpected error shuting down RServe", e);
	}
}
 
开发者ID:jfcorugedo,项目名称:RJavaServer,代码行数:17,代码来源:RServeEngineProviderService.java

示例2: stop

import org.rosuda.REngine.Rserve.RConnection; //导入方法依赖的package包/类
public void stop() {
    println("stopping R daemon... " + conf, Level.INFO);
    if (!conf.isLocal()) {
        throw new UnsupportedOperationException(
                "Not authorized to stop a remote R daemon: "
                        + conf.toString());
    }

    try {
        RConnection s = conf.connect();
        if (s == null || !s.isConnected()) {
            println("R daemon already stoped.", Level.INFO);
            return;
        }
        s.shutdown();

    } catch (Exception ex) {
        // ex.printStackTrace();
        println(ex.getMessage(), Level.ERROR);
    }

    /*
     * if (br != null) { try { br.close(); } catch (IOException ex) {
     * ex.printStackTrace(); println(ex.getMessage()); } }
     */

    // if (pw != null) {
    // pw.close();
    // }

    // process.destroy();

    println("R daemon stoped.", Level.INFO);

    log = null;
}
 
开发者ID:mzmine,项目名称:mzmine2,代码行数:37,代码来源:Rdaemon.java

示例3: main

import org.rosuda.REngine.Rserve.RConnection; //导入方法依赖的package包/类
/** just a demo main method which starts Rserve and shuts it down again */
public static void main(String[] args) {
    System.err.println("result=" + checkLocalRserve());
    try {
        RConnection c = new RConnection();
        c.shutdown();
    } catch (Exception x) {
    }
}
 
开发者ID:mzmine,项目名称:mzmine2,代码行数:10,代码来源:StartRserve.java

示例4: main

import org.rosuda.REngine.Rserve.RConnection; //导入方法依赖的package包/类
/** just a demo main method which starts Rserve and shuts it down again */
public static void main(String[] args) {
	System.out.println("result="+checkLocalRserve());
	try {
		RConnection c=new RConnection();
		c.shutdown();
	} catch (Exception x) {};
}
 
开发者ID:erickalendra,项目名称:JavaRserveREngineClient,代码行数:9,代码来源:StartRserve.java


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