📄 tsp.java
字号:
package com.wireless.sms.gwif.smsagent.entity;
/**
* <p>Title: WVAS-PLATFORM-SMS</p>
* <p>Description: 无线增值业务平台--短信接口机--腾顺</p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: Entel</p>
* @author: liukai
* @version 1.0
*
*/
//import java.util.Vector;
import org.apache.commons.configuration.Configuration;
import com.wireless.sms.pub.util.CTime;
//import com.wireless.sms.pub.mq.*;
import com.wireless.sms.unsoap.SMSReceiver;
public class TSP {
private static TSP _instance = null;
private String gatewayID;
private String gatewayNameCM;
private String gatewayNameCT;
private String gatewayNameUN;
private String icpid;
private String passwd;
private String serverIP;
private int serverport;
private String localIP;
private int localport;
private int version;
private String timestamp;
private int MOEnQueueThreadNum;
private int MODeQueueThreadNum;
private int MTDeQueueThreadNum;
private int STATDeQueueThreadNum;
private String processClassName;
private static Configuration conf = SMSReceiver.configuration;
//下面的这些参数只有在新的应用中才可以用到,在旧的应用中用不到
private int serverMtPort; //在新的的应用中,原来的默认为上行的端口
private boolean isSendActiveTest = true; //默认为发送
private int waitTimeout = 60; //默认为60秒
private int sendCount = 3; //发送测试信息的次数
private int spanSend = 30; //默认30秒发送一次
private int controlSize = 16; //默认为16;
private int mtVesion = 0; //默认的数值为0
private String gatewayVendor = "";
private String tspType = "1.3"; //smgp 的版本号
private int flowControl = 5;//2005-1-5 新增流量控制属性
private int operesponsetime = 60;
private boolean serialFlag;
public static synchronized TSP getInstance() {
if (_instance == null) {
_instance = new TSP();
}
return _instance;
}
public TSP() {
this.gatewayID = conf.getString("tsp.GateWayID", "1");
this.gatewayNameCM = conf.getString("tsp.GateNameCM");
this.gatewayNameCT = conf.getString("tsp.GateNameCT");
this.gatewayNameUN = conf.getString("tsp.GateNameUN");
this.icpid = conf.getString("tsp.IcpId");
this.passwd = conf.getString("tsp.IcpShareKey");
this.serverIP = conf.getString("tsp.ServerIP");
this.serverport = conf.getInt("tsp.ServerPort");
this.localIP = conf.getString("tsp.LocalIP");
this.localport = conf.getInt("tsp.LocalPort");
this.version = conf.getInt("tsp.Version");
this.timestamp = conf.getString("tsp.TimeStamp", CTime.getTime(CTime.YYMMDDhhmm));
this.MOEnQueueThreadNum = conf.getInt("tsp.MOEnQueueThreadNum", 1);
this.MODeQueueThreadNum = conf.getInt("tsp.MODeQueueThreadNum", 1);
this.MTDeQueueThreadNum = conf.getInt("tsp.MTDeQueueThreadNum", 1);
this.STATDeQueueThreadNum = conf.getInt("tsp.STATDeQueueThreadNum", 1);
//为新的应用加入的
this.controlSize = conf.getInt("tsp.ControlSize");
this.serverMtPort = conf.getInt("tsp.ServerMtPort");
this.isSendActiveTest = conf.getBoolean("tsp.IsSendActiveTest");
this.spanSend = conf.getInt("tsp.SpanSend");
this.sendCount = conf.getInt("tsp.SendCount");
this.waitTimeout = conf.getInt("tsp.RequestTimeout");
this.mtVesion = conf.getInt("tsp.MtVersion");
this.gatewayVendor = conf.getString("tsp.gatewayVendor");
this.tspType = conf.getString("tsp.TSPType");
this.flowControl = conf.getInt("tsp.flowControl");
this.operesponsetime = conf.getInt("tsp.operesponsetime");
this.processClassName = conf.getString("tsp.ProcessClassName");
this.serialFlag = conf.getBoolean("tsp.serialFlag", false);
}
public String getGatewayID() {
return gatewayID;
}
public String getGatewayNameCM() {
return gatewayNameCM;
}
public String getIcpid() {
return icpid;
}
public String getPasswd() {
return passwd;
}
public String getServerIP() {
return serverIP;
}
public int getServerport() {
return serverport;
}
public String getLocalIP() {
return localIP;
}
public int getLocalport() {
return localport;
}
public String getTimestamp() {
return timestamp;
}
public int getVersion() {
return version;
}
public void setGatewayID(String gatewayID) {
this.gatewayID = gatewayID;
}
public void setGatewayNameCM(String gatewayNameCM) {
this.gatewayNameCM = gatewayNameCM;
}
public void setIcpid(String icpid) {
this.icpid = icpid;
}
public void setPasswd(String passwd) {
this.passwd = passwd;
}
public void setServerIP(String serverIP) {
this.serverIP = serverIP;
}
public void setServerport(int serverport) {
this.serverport = serverport;
}
public void setTimestamp(String timestamp) {
this.timestamp = timestamp;
}
public void setVersion(int version) {
this.version = version;
}
public int getMODeQueueThreadNum() {
return MODeQueueThreadNum;
}
public int getMOEnQueueThreadNum() {
return MOEnQueueThreadNum;
}
public int getMTDeQueueThreadNum() {
return MTDeQueueThreadNum;
}
public int getControlSize() {
return controlSize;
}
public void setControlSize(int controlSize) {
this.controlSize = controlSize;
}
public boolean getIsSendActiveTest() {
return isSendActiveTest;
}
public void setIsSendActiveTest(boolean isSendActiveTest) {
this.isSendActiveTest = isSendActiveTest;
}
public int getSendCount() {
return sendCount;
}
public void setSendCount(int sendCount) {
this.sendCount = sendCount;
}
public int getServerMtPort() {
return serverMtPort;
}
public void setServerMtPort(int serverMtPort) {
this.serverMtPort = serverMtPort;
}
public int getSpanSend() {
return spanSend;
}
public void setSpanSend(int spanSend) {
this.spanSend = spanSend;
}
public int getWaitTimeout() {
return waitTimeout;
}
public void setWaitTimeout(int waitTimeout) {
this.waitTimeout = waitTimeout;
}
public int getMtVesion() {
return mtVesion;
}
public void setMtVesion(int mtVesion) {
this.mtVesion = mtVesion;
}
public String getGatewayVendor() {
return gatewayVendor;
}
public void setGatewayVendor(String gatewayVendor) {
this.gatewayVendor = gatewayVendor;
}
public String getCmppType() {
return tspType;
}
public void setCmppType(String smgpType) {
this.tspType = smgpType;
}
public int getFlowControl() {
return flowControl;
}
public void setFlowControl(int flowControl) {
this.flowControl = flowControl;
}
public int getOperesponsetime() {
return operesponsetime;
}
public String getProcessClassName() {
return processClassName;
}
public String getGatewayNameUN() {
return gatewayNameUN;
}
public String getGatewayNameCT() {
return gatewayNameCT;
}
public void setOperesponsetime(int operesponsetime) {
this.operesponsetime = operesponsetime;
}
public void setGatewayNameUN(String gatewayNameUN) {
this.gatewayNameUN = gatewayNameUN;
}
public void setGatewayNameCT(String gatewayNameCT) {
this.gatewayNameCT = gatewayNameCT;
}
public int getSTATDeQueueThreadNum() {
return STATDeQueueThreadNum;
}
public void setSTATDeQueueThreadNum(int STATDeQueueThreadNum) {
this.STATDeQueueThreadNum = STATDeQueueThreadNum;
}
public boolean isSerialFlag() {
return serialFlag;
}
public void setSerialFlag(boolean serialFlag) {
this.serialFlag = serialFlag;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -