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

📄 cm.java

📁 中国联通短信通信协议
💻 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: moon</p>
 * @author: tech team
 * @version 1.0
 * 连接中国移动的所有信息
 */

import org.apache.commons.configuration.Configuration;

import com.wireless.sms.pub.util.CTime;
import com.wireless.sms.unsoap.SMSReceiver;

public class CM {
    private static CM _instance = null;
    private String gatewayID;
    private String gatewayName;
    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 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 cmppType = "2.0"; //cmpp 的版本号

    //kk add at 2005-1-5 新增流量控制属性
    private int flowControl = 5;

    //kk add at 2005-1-11
    private int operesponsetime = 60;
    private String processClassName;

    //该网关是否要求发送信息序列化
    private boolean serialFlag;


    public static synchronized CM getInstance() {
        if (_instance == null) {
            _instance = new CM();
        }
        return _instance;
    }

    public CM() {
        this.gatewayID = conf.getString("cmpp.GateWayID", "1");
        this.gatewayName = conf.getString("cmpp.GateName");
        this.icpid = conf.getString("cmpp.IcpId");
        this.passwd = conf.getString("cmpp.IcpShareKey");
        this.serverIP = conf.getString("cmpp.ServerIP");
        this.serverport = conf.getInt("cmpp.ServerPort");
        this.localIP = conf.getString("cmpp.LocalIP");
        this.localPort = conf.getInt("cmpp.LocalPort");
        this.processClassName = conf.getString("cmpp.ProcessClassName");
        this.version = conf.getInt("cmpp.Version");
        this.timestamp = conf.getString("cmpp.TimeStamp", CTime.getTime(CTime.YYMMDDhhmm));
        this.MOEnQueueThreadNum = conf.getInt("cmpp.MOEnQueueThreadNum", 1);
        this.MODeQueueThreadNum = conf.getInt("cmpp.MODeQueueThreadNum", 1);
        this.MTDeQueueThreadNum = conf.getInt("cmpp.MTDeQueueThreadNum", 1);
        //为新的应用加入的
        this.controlSize = conf.getInt("cmpp.ControlSize");
        this.serverMtPort = conf.getInt("cmpp.ServerMtPort");
        this.isSendActiveTest = conf.getBoolean("cmpp.IsSendActiveTest");
        this.spanSend = conf.getInt("cmpp.SpanSend");
        this.sendCount = conf.getInt("cmpp.SendCount");
        this.waitTimeout = conf.getInt("cmpp.RequestTimeout");
        this.mtVesion = conf.getInt("cmpp.MtVersion");
        this.gatewayVendor = conf.getString("cmpp.gatewayVendor");
        this.cmppType = conf.getString("cmpp.CMPPType");
        this.flowControl = conf.getInt("cmpp.flowControl");
        this.operesponsetime = conf.getInt("cmpp.operesponsetime");
        this.serialFlag = conf.getBoolean("cmpp.serialFlag", false);
    }

    public String getGatewayID() {
        return gatewayID;
    }

    public String getGatewayName() {
        return gatewayName;
    }

    public String getIcpid() {
        return icpid;
    }

    public String getPasswd() {
        return passwd;
    }

    public String getServerIP() {
        return serverIP;
    }

    public int getServerport() {
        return serverport;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public int getVersion() {
        return version;
    }

    public void setGatewayID(String gatewayID) {
        this.gatewayID = gatewayID;
    }

    public void setGatewayName(String gatewayName) {
        this.gatewayName = gatewayName;
    }

    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 cmppType;
    }

    public void setCmppType(String cmppType) {
        this.cmppType = cmppType;
    }

    public int getFlowControl() {
        return flowControl;
    }

    public void setFlowControl(int flowControl) {
        this.flowControl = flowControl;
    }

    public int getOperesponsetime() {
        return operesponsetime;
    }

    public void setOperesponsetime(int operesponsetime) {
        this.operesponsetime = operesponsetime;
    }
    public String getLocalIP() {
        return localIP;
    }
    public void setLocalIP(String localIP) {
        this.localIP = localIP;
    }
    public int getLocalPort() {
        return localPort;
    }
    public void setLocalPort(int localPort) {
        this.localPort = localPort;
    }
    public String getProcessClassName() {
        return processClassName;
    }
    public void setProcessClassName(String processClassName) {
        this.processClassName = processClassName;
    }
    public boolean isSerialFlag() {
        return serialFlag;
    }
    public void setSerialFlag(boolean serialFlag) {
        this.serialFlag = serialFlag;
    }
}

⌨️ 快捷键说明

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