⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 env.java

📁 华为短信网关实现的功能,包括服务器端和客户端代码
💻 JAVA
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -