📄 crbtgwifglobal.java
字号:
ProcessClassName= XMLConfig.getConfiguration().getString("cn.ProcessClassName");
SubmitRetry = XMLConfig.getConfiguration().getInt("cn.SubmitRetry");
RequestTimeout= XMLConfig.getConfiguration().getInt("cn.RequestTimeout");
TimeStamp= XMLConfig.getConfiguration().getString("cn.TimeStamp");
Type = XMLConfig.getConfiguration().getString("cn.Type");
Version= XMLConfig.getConfiguration().getString("cn.Version");
ControlSize= XMLConfig.getConfiguration().getInt("cn.ControlSize");
IsSendActiveTest = XMLConfig.getConfiguration().getBoolean("cn.IsSendActiveTest");
SpanSend= XMLConfig.getConfiguration().getInt("cn.SpanSend");
SendCount= XMLConfig.getConfiguration().getInt("cn.SendCount");
gatewayVendor = XMLConfig.getConfiguration().getString("cn.gatewayVendor");
ThreadNum= XMLConfig.getConfiguration().getInt("cn.ThreadNum");
flowControl= XMLConfig.getConfiguration().getInt("cn.flowControl");
operesponsetime = XMLConfig.getConfiguration().getInt("cn.operesponsetime");
}
public void initCT_System() {
initCommon();
waitTime = XMLConfig.getConfiguration().getInt("ct.WaitTime");
GATEWAY = XMLConfig.getConfiguration().getString("ct.GateWayID");
GATEWAYNAME = XMLConfig.getConfiguration().getString("ct.GateName");
sou_addr = XMLConfig.getConfiguration().getString("ct.Sou_addr");
des_addr = XMLConfig.getConfiguration().getString("ct.Des_addr");
SP_CODE = XMLConfig.getConfiguration().getString("ct.Sp_code");
PASSWORD = XMLConfig.getConfiguration().getString("ct.Password");
ServerIP = XMLConfig.getConfiguration().getString("ct.ServerIP");
ServerPort= XMLConfig.getConfiguration().getInt("ct.ServerPort");
LocalIP = XMLConfig.getConfiguration().getString("ct.LocalIP");
LocalPort= XMLConfig.getConfiguration().getInt("ct.LocalPort");
ProcessClassName= XMLConfig.getConfiguration().getString("ct.ProcessClassName");
SubmitRetry = XMLConfig.getConfiguration().getInt("ct.SubmitRetry");
RequestTimeout= XMLConfig.getConfiguration().getInt("ct.RequestTimeout");
TimeStamp= XMLConfig.getConfiguration().getString("ct.TimeStamp");
Type = XMLConfig.getConfiguration().getString("ct.Type");
Version= XMLConfig.getConfiguration().getString("ct.Version");
ControlSize= XMLConfig.getConfiguration().getInt("ct.ControlSize");
IsSendActiveTest = XMLConfig.getConfiguration().getBoolean("ct.IsSendActiveTest");
SpanSend= XMLConfig.getConfiguration().getInt("ct.SpanSend");
SendCount= XMLConfig.getConfiguration().getInt("ct.SendCount");
gatewayVendor = XMLConfig.getConfiguration().getString("ct.gatewayVendor");
ThreadNum= XMLConfig.getConfiguration().getInt("ct.ThreadNum");
flowControl= XMLConfig.getConfiguration().getInt("ct.flowControl");
operesponsetime = XMLConfig.getConfiguration().getInt("ct.operesponsetime");
}
public void initSC_System() {
initCommon();
waitTime = XMLConfig.getConfiguration().getInt("sc.WaitTime");
GATEWAY = XMLConfig.getConfiguration().getString("sc.GateWayID");
GATEWAYNAME = XMLConfig.getConfiguration().getString("sc.GateName");
sou_addr = XMLConfig.getConfiguration().getString("sc.Sou_addr");
des_addr = XMLConfig.getConfiguration().getString("sc.Des_addr");
SP_CODE = XMLConfig.getConfiguration().getString("sc.Sp_code");
PASSWORD = XMLConfig.getConfiguration().getString("sc.Password");
ServerIP = XMLConfig.getConfiguration().getString("sc.ServerIP");
ServerPort= XMLConfig.getConfiguration().getInt("sc.ServerPort");
LocalIP = XMLConfig.getConfiguration().getString("sc.LocalIP");
LocalPort= XMLConfig.getConfiguration().getInt("sc.LocalPort");
ProcessClassName= XMLConfig.getConfiguration().getString("sc.ProcessClassName");
SubmitRetry = XMLConfig.getConfiguration().getInt("sc.SubmitRetry");
RequestTimeout= XMLConfig.getConfiguration().getInt("sc.RequestTimeout");
TimeStamp= XMLConfig.getConfiguration().getString("sc.TimeStamp");
Type = XMLConfig.getConfiguration().getString("sc.Type");
Version= XMLConfig.getConfiguration().getString("sc.Version");
ControlSize= XMLConfig.getConfiguration().getInt("sc.ControlSize");
IsSendActiveTest = XMLConfig.getConfiguration().getBoolean("sc.IsSendActiveTest");
SpanSend= XMLConfig.getConfiguration().getInt("sc.SpanSend");
SendCount= XMLConfig.getConfiguration().getInt("sc.SendCount");
gatewayVendor = XMLConfig.getConfiguration().getString("sc.gatewayVendor");
ThreadNum= XMLConfig.getConfiguration().getInt("sc.ThreadNum");
flowControl= XMLConfig.getConfiguration().getInt("sc.flowControl");
operesponsetime = XMLConfig.getConfiguration().getInt("sc.operesponsetime");
}
public void initTSP_System() {
initCommon();
waitTime = XMLConfig.getConfiguration().getInt("tsp.WaitTime");
GATEWAY = XMLConfig.getConfiguration().getString("tsp.GateWayID");
GATEWAYNAME = XMLConfig.getConfiguration().getString("tsp.GateName");
sou_addr = XMLConfig.getConfiguration().getString("tsp.Sou_addr");
des_addr = XMLConfig.getConfiguration().getString("tsp.Des_addr");
SP_CODE = XMLConfig.getConfiguration().getString("tsp.Sp_code");
PASSWORD = XMLConfig.getConfiguration().getString("tsp.Password");
ServerIP = XMLConfig.getConfiguration().getString("tsp.ServerIP");
ServerPort= XMLConfig.getConfiguration().getInt("tsp.ServerPort");
LocalIP = XMLConfig.getConfiguration().getString("tsp.LocalIP");
LocalPort= XMLConfig.getConfiguration().getInt("tsp.LocalPort");
ProcessClassName= XMLConfig.getConfiguration().getString("tsp.ProcessClassName");
SubmitRetry = XMLConfig.getConfiguration().getInt("tsp.SubmitRetry");
RequestTimeout= XMLConfig.getConfiguration().getInt("tsp.RequestTimeout");
TimeStamp= XMLConfig.getConfiguration().getString("tsp.TimeStamp");
Type = XMLConfig.getConfiguration().getString("tsp.Type");
Version= XMLConfig.getConfiguration().getString("tsp.Version");
ControlSize= XMLConfig.getConfiguration().getInt("tsp.ControlSize");
IsSendActiveTest = XMLConfig.getConfiguration().getBoolean("tsp.IsSendActiveTest");
SpanSend= XMLConfig.getConfiguration().getInt("tsp.SpanSend");
SendCount= XMLConfig.getConfiguration().getInt("tsp.SendCount");
gatewayVendor = XMLConfig.getConfiguration().getString("tsp.gatewayVendor");
ThreadNum= XMLConfig.getConfiguration().getInt("tsp.ThreadNum");
flowControl= XMLConfig.getConfiguration().getInt("tsp.flowControl");
operesponsetime = XMLConfig.getConfiguration().getInt("tsp.operesponsetime");
}
public static void sendMonitor(String errorCode) {
monitor.setErrorCode(errorCode);
monitorClientSocket.sendMonitor(monitor);
}
public static void sendMonitor(String errorCode, String processName) {
monitor.setErrorCode(errorCode);
monitor.setProcessName(processName);
monitorClientSocket.sendMonitor(monitor);
}
/**
* Test
*/
public static void main(String[] args){
// CrbtGWIFGlobal test=
// CrbtGWIFGlobal.getInstance();
// test.initUN_System();
// test.testPrint();
int i=20;
while((--i)>0){
System.out.println(Util.getSeq_no());
try{
Thread.sleep(500);
new Thread(){
public void run(){
while(true){
System.out.println(Util.getSeq_no());
try{
Thread.sleep(1000);
}catch(Exception e){}
}
}
}.start();
}catch(Exception e){}
}
}
public void testPrint(){
org.apache.log4j.Logger log=LoggerConstant.log;
log.info("GATEWAY :"+GATEWAY);
log.info("GATEWAYNAME :"+GATEWAYNAME);
log.info("SP_CODE :"+SP_CODE);
log.info("Password :"+PASSWORD);
log.info("monitorHosta :"+processString(monitorHosta).toString());
log.info("monitorPorta :"+processString(monitorPorta).toString());
log.info("waitTime :"+waitTime);
log.info("MTserverSocketVec :"+processVector(MTserverSocketVec).toString());
log.info("vManage :"+processVector(vManage).toString());
log.info("monitor :"+monitor.toString());
log.info("switchip :"+switchip);
log.info("switchname :"+switchname);
log.info("sou_addr :"+sou_addr);
log.info("des_addr :"+des_addr);
log.info("reloadPort :"+reloadPort);
log.info("------------end-------------");
}
private String processVector(Vector v){
Vector tempvector=new Vector(v);
String temp="";
int total=tempvector.size();
for(int i=0;i<total;i++){
temp+=(String)tempvector.elementAt(i)+" ";
}
return temp;
}
private String processString(String [] str){
String temp="";
for(int i=0;i<str.length;i++){
temp+=str[i]+" ";
}
return temp;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -