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

📄 getthread.java~79~

📁 短信网关发送接受平台。
💻 JAVA~79~
字号:
package orderapp;import utilities.Engine;import java.io.*;import xml.*;public class getThread extends Engine {	public getLabel label;	public getThread(InputStreamReader in) {		super("getThread");		setDaemon(true);		Config.br=new BufferedReader(in);		label=new getLabel();	}	public void run(){		String xmlStr="";		String xmlTemp="";		while(isRunning()){			try{						xmlStr=Config.br.readLine();						//数据分流						//1、Mo池 2、收条池 3、Response池 4、Gateway_status池						if (xmlStr!=null){							if(xmlStr.startsWith("<cmpp_deliver") ){							       xmlTemp=label.getString("cmpp_deliver/registered_delivery",xmlStr);							      if(xmlTemp.equals("1")){								//收条池								while(!Config.receipt_queue.push(xmlStr))nap();							      }else if(xmlTemp.equals("0")){								 //Mo池								 while(!Config.mo_queue.push(xmlStr))nap();								 Config.incMo();								 Config.log.log("Get A MO\t"+"GatewayName:  "+label.getString("source/name",xmlStr)+";Source_Guid:  "+label.getString("source/guid",xmlStr)+";SubCode:  "+label.getString("destination_id",xmlStr)+";Msg_id:  "+label.getString("msg_content",xmlStr));							      }							}						//Response池							if(xmlStr.startsWith("<cmpp_submit_response")){								while(!Config.response_queue.push(xmlStr))nap();								Config.resp++;								 //System.out.println(xmlStr);							}							//Gateway_status池							if(xmlStr.startsWith("<gateway_status>"))								while(!Config.gateway_queue.push(xmlStr))nap();						}else{							nap();						}						Thread.sleep(100);			}catch(Exception e){				//Config.log.log(e,"while read xmlstr from the XMLCenter in RecvManager");				e.printStackTrace();				shutdown();			}		}		try{			Config.br.close();		}catch(Exception e){			//e.printStackTrace();			shutdown();			Config.log.log(e,"while the thread: "+this.toString()+" is reading data from socket!" );			System.out.println("while the thread: "+this.toString()+" is reading data from socket!");		}	}	public void shutdown(){		super.shutdown();		try{			Config.br.close();		}catch(Exception e){}	}}

⌨️ 快捷键说明

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