📄 sendthread.java
字号:
package orderapp; /** * Title: * Description: * 发送线程,与submit队列连接 * Copyright: Copyright (c) 2002 * Company: * @author * @version 1.0 */import java.io.*;import java.net.*;import utilities.Engine;import xml.getLabel;public class sendThread extends Engine { public getLabel GetLabel; public String str; public sendThread(OutputStream out) { super("SendManager"); setDaemon(true); Config.ps=new PrintStream(out); GetLabel=new getLabel(); } public void run(){ while(isRunning()){ try{ if(!Config.submit_queue.isEmpty()){ str=(String)Config.submit_queue.pop(); //System.out.println("|"+Config.submit_queue.size+"|mt"); //Config.LogPool.push("Get A MT:\t"+GetLabel.getString("destination/name",str)+";dest_terminal_id: "+GetLabel.getString("dest_terminal_id",str)+";Msg_fmt: "+GetLabel.getString("msg_fmt",str)+";Msg_content: "+GetLabel.getString("msg_content",str)+";Tp_udhi"+GetLabel.getString("tp_udhi",str)); if (str!=null){ //str=str+"\r\n"; Config.ps.print(str); System.out.println(str); Config.incMt(); } } //Thread.sleep((1024)/(Config.submit_queue.size+1)); Thread.sleep(1); }catch(Exception e){ //this.shutdown(); Config.LogPool.push("while the thread: "+e.toString()+" is writing data from socket!" ); //System.out.println("while the thread: "+this.toString()+" is writing data from socket!"); } } //shutdown(); }/* public void shutdown(){ super.shutdown(); try{ Config.ps.close(); }catch(Exception e){} } public static void main(String[] args) { //SendManager sendManager1 = new SendManager(); }*/}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -