`
yinhj
  • 浏览: 73971 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

ResponseWorker.java

    博客分类:
  • IMTI
阅读更多
package com.msp.smg;

import com.logica.smpp.Receiver;
import com.logica.smpp.pdu.*;
import com.logica.smpp.*;

public class ResponseWorker extends Thread {

	private boolean isRuning = true;
	private Receiver receiver = null;
	private PDU pdu = null;

	public Receiver getReceiver() {
		return receiver;
	}

	public void setReceiver(Receiver receiver) {
		this.receiver = receiver;
	}

	public void run() {
		while (isRuning) {
			try {
				pdu = receiver.receive(1000);
				while (pdu != null) {
					switch (pdu.getCommandId()) {
					case Data.SUBMIT_SM_RESP:
						long sequenceNumber = pdu.getSequenceNumber();
						break;
					case Data.BIND_TRANSCEIVER_RESP:
						break;
					}
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			} finally {
				isRuning = true;
			}
		}
	}

}

 截止到2008年5月26日的代码

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics