/**
*
*/
package com.ytec.jdap.process;
import com.ytec.jdap.common.Constants;
import com.ytec.jdap.common.Global;
import com.ytec.jdap.common.StringUtil;
import com.ytec.jdap.process.impl.ProcessManagerLinux;
import com.ytec.jdap.process.impl.ProcessManagerWindows;
/**
* <pre>
* Title: ���̴�������
* Description: ���̴�������
* </pre>
*
* @author CaiJiuFa
* @version 1.00.00
*
* <pre>
* �ļ�¼
* �ĺ�汾: ���ˣ� ������: ������:
* </pre>
*/
public class ProcessTookit {
private static IProcessManager processManager;
public static IProcessManager getIProcessManager() throws Exception{
synchronized (ProcessTookit.class) {
if (processManager == null) {
if (StringUtil.isBlank(Global.os) || Global.os.toUpperCase().indexOf(Constants.SYSTEM_WINDOWS) != -1) {
processManager = new ProcessManagerWindows();
} else if(Global.os.toUpperCase().indexOf(Constants.SYSTEM_LINUX) != -1){
processManager = new ProcessManagerLinux();
} else{
throw new Exception("��ȡ��������ϵͳ���ͣ����������ļ����ֶ�����OS������");
}
}
return processManager;
}
}
}