ResponseWorker.java

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日的代码

阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页