env.java.svn-base

来自「华为短信网关实现的功能,包括服务器端和客户端代码」· SVN-BASE 代码 · 共 54 行

SVN-BASE
54
字号
package com.fetion.cmpp.server.sender;

import java.io.File;
import java.io.IOException;

import com.fetion.cmpp.server.util.Constants;
import com.huawei.smproxy.util.Cfg;
import com.huawei.smproxy.util.Resource;

/**
 * 发送短信的配置类
 * @author Administrator
 *
 */
public class Env
{

	public Env() {

	}

	public static Cfg getConfig()
	{

		if (config == null)
			try
			{
				config = new Cfg(Constants.CMPP_CONFIG_NAME+File.separator+"config.xml");
			} catch (Exception ex)
			{
				ex.printStackTrace();
			}
		return config;
	}

	public static Resource getResource()
	{

		if (resource == null)
			try
			{
				resource = new Resource("resource");
			} catch (IOException ex)
			{
				ex.printStackTrace();
			}
		return resource;
	}

	static Cfg config;

	static Resource resource;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?