Package com.ytec.jdap.process

Source Code of com.ytec.jdap.process.ProcessTookit

/**
*
*/
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;
    }
  }
}
TOP

Related Classes of com.ytec.jdap.process.ProcessTookit

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.