首页>代码>java多线程调用Perl脚本操作数据仓库>/MultiRunPerlByJava/src/com/asiainfo/service/AppService.java
package com.asiainfo.service;

import com.asiainfo.model.Param;
import com.asiainfo.model.User;
import com.asiainfo.util.PerlUtil;

/**
 * 
 * @ClassName: AppService
 * @Description: 执行Perl 的 线程类
 * @author Comsys-BerWin
 * @date 2016年3月7日 下午4:41:38
 *
 */
public class AppService implements Runnable {

	private String[] cmd = new String[9];

	public AppService(Param param, User user) {
		this.cmd[0] = param.getCmdName();
		this.cmd[1] = param.getPath() + param.getFileName();
		this.cmd[2] = param.getHost();
		this.cmd[3] = param.getPort();
		this.cmd[4] = param.getDataBaseName();
		this.cmd[5] = param.getUsername();
		this.cmd[6] = param.getPassword();
		this.cmd[7] = user.getId() + "";
		this.cmd[8] = user.getName();
	}

	
	
	@Override
	public void run() {
		try {
			Thread.sleep(2000);
			PerlUtil.runPerl(cmd);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
最近下载更多
wangjinglin  LV1 2019年12月9日
liuyishi  LV6 2019年4月6日
blazing  LV2 2019年2月19日
a1351328329  LV1 2018年6月25日
jic499  LV27 2018年4月13日
人工智能4708  LV11 2018年3月13日
sdxrh2005  LV1 2018年1月20日
shenkang10086  LV6 2017年5月11日
wyj11www  LV1 2016年12月28日
WwZQ  LV15 2016年4月8日
最近浏览更多
liqing1  LV1 2023年12月28日
zw050256  LV7 2022年10月10日
dongzhan  LV12 2021年12月15日
歪歪歪  LV8 2021年9月5日
肥波先生  LV12 2021年8月10日
fgy9826  LV5 2021年3月22日
xiongfan  LV6 2021年3月15日
LiXin1994  LV1 2020年12月9日
866521  LV2 2020年9月7日
2687772871  LV1 2020年8月29日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友