adcoption.java
来自「电信业务的ADC的接口程序 包括客户端和服务器端的程序」· Java 代码 · 共 81 行
JAVA
81 行
package mcm.adc;
import java.util.Properties;
import mcm.util.Resources;
public class ADCOption {
private static ADCOption option = new ADCOption();
public static ADCOption getInstance(){
return option;
}
private Properties prop;
/** ADC服务的URL */
private String ADCSrvUrl = null;
/** SI服务CODE */
private String SICode = null;
/** SI服务提供的URL */
private String SIActUrl = null;
/**
* 构造函数,初始化设定
*
*/
private ADCOption(){
try{
prop = new Properties();
prop.load(Resources.getResourceAsStream("properties/adc.properties"));
ADCSrvUrl = prop.getProperty("ADCServiceURL");
SICode = prop.getProperty("SICode");
SIActUrl = prop.getProperty("SIActionURL");
}
catch(Exception ex){
ex.printStackTrace(System.err);
}
}
/**
* @return the aDCSrvUrl
*/
public String getADCSrvUrl() {
return ADCSrvUrl;
}
/**
* @return the sIActUrl
*/
public String getSIActUrl() {
return SIActUrl;
}
/**
* @return the sICode
*/
public String getSICode() {
return SICode;
}
/**
*
* @param code
* @return
*/
public String getResultMess(String code){
String mess = prop.getProperty("RESULT_MESS_" + code);
if(mess == null){
return code;
}
return mess;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?