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