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

📄 moenginetwo.java~4~

📁 短信网关发送接受平台。
💻 JAVA~4~
字号:
package orderapp;/** * Title: * Description: * Copyright:    Copyright (c) 2002 * Company: * @author * @version 1.0 */import utilities.*;import data.*;import xml.getLabel;import java.sql.*;public class moEngineTwo extends Engine {       public String str;       public String subcode;       //public ConnectionPool data;       public getLabel getLabelString;       public XmlString xml;       public String submit;       public getContent pushSubmit;       public String sqlMo;	public moEngineTwo() {	       setDaemon(true);	       //data=new ConnectionPool();	      getLabelString=new getLabel();	      xml=new XmlString();	      pushSubmit=new getContent();	}	public void run(){	       while(true){			if(!Config.mo_queue.isEmpty()){				str=(String)Config.mo_queue.pop();				//加入Mo统计池				Config.MoStatistics.push(str);				xml.destination_id=getLabelString.getString("cmpp_deliver/destination_id",str);				//String ddd=getLabelString.getString("cmpp_deliver/service_id",str);				//打印MO包				System.out.println(str+"OOOOOOOOO");				if(xml.destination_id.startsWith("0")){					subcode=(xml.destination_id).substring(5);					Config.service_code=(xml.destination_id).substring(0,5);				}else{					subcode=(xml.destination_id).substring(4);					Config.service_code=(xml.destination_id).substring(0,4);				}				xml.msg_fmt=getLabelString.getString("cmpp_deliver/msg_fmt",str);				//System.out.println(xml.msg_fmt+"++++");				xml.msg_content=getLabelString.getString("cmpp_deliver/msg_content",str);				//字符转换				String content=toLowerCaseString(xml.msg_content,15);				//System.out.println(content);				xml.src_terminal_id=getLabelString.getString("cmpp_deliver/src_terminal_id",str);				xml.msg_id=getLabelString.getString("cmpp_deliver/msg_id",str);				xml.registered_delivery=getLabelString.getString("cmpp_deliver/registered_delivery",str);				xml.source_name=getLabelString.getString("cmpp_deliver/source/name",str);				//从mobile_content 表中提取内容生成submit包压入submit池				//pushSubmit=new getContent(xml.msg_content,xml.src_terminal_id);				//Mo加入Mobile_bill表				//sqlMo="insert into mobile_bill (";				//Config.sql_queue.push(sqlMo);				//根据Mo提取内容生成Mt,加入Mobile_bill表				//System.out.println(subcode);				pushSubmit.getParameter(content,subcode,"mt",xml.msg_id,xml.src_terminal_id,xml.registered_delivery,xml.source_name,xml.msg_fmt);				pushSubmit.insertSubmit();				//pushSubmit=null;				//Config.submit_queue.push("<cmpp_submit><source><name>1</name><guid>1001</guid></source><destination><name>standard</name></destination><src_terminal_id>5988</src_terminal_id><dest_terminal_id>13910139946</dest_terminal_id><msg_fmt>0</msg_fmt><tp_pid>0</tp_pid><tp_udhi>0</tp_udhi><registered_delivery>0</registered_delivery><service_id>DJSD</service_id><fee_user_type>0</fee_user_type><fee_type>02</fee_type><fee_code>000010</fee_code><msg_content>30313233343536373839</msg_content></cmpp_submit>\r\n");			}			try{				//Thread.sleep(Config.sleep_time);				Thread.sleep(5);			}			catch(Exception e){					e.printStackTrace();			}	       }	}public static String toLowerCaseString(String hexStr,int msg_fmt){		String result="";		String temp;		int len=hexStr.length();		if (hexStr.startsWith("00")){			len=len/4;			for (int i=0;i<len;i++){				temp=hexStr.substring(i*4+2,i*4+4);				if (Integer.parseInt(temp,16) > 0x7a)					return result;				result+=(char)Byte.parseByte(temp,16);			}		}else{			len=len/2;			for (int i=0;i<len;i++){				temp=hexStr.substring(i*2,i*2+2);				if (Integer.parseInt(temp,16) > 0x7a)					return result;				result+=(char)Byte.parseByte(temp,16);			}		}		return result.toLowerCase();	}}

⌨️ 快捷键说明

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