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();
}
}
}
最近下载更多
pj_fhzy LV3
2024年10月13日
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日

最近浏览