Dibatalkan

opensmpp SMPPTestPDUEventListener do deliver_sm_resp

need consulation how to do deliver_sm_resp after receive deliver_sm in async mode opensmpp . consultation usd10. below is the listener class

private class SMPPTestPDUEventListener extends SmppObject implements ServerPDUEventListener {

Session session;

Queue requestEvents = new Queue();

public SMPPTestPDUEventListener(Session session) {

[url removed, login to view] = session;

}

public void handleEvent(ServerPDUEvent event) {

PDU pdu = [url removed, login to view]();

if ([url removed, login to view]()) {

[url removed, login to view]("async request received, enqueuing " + [url removed, login to view]());

if( pdu instanceof DeliverSM ){

[url removed, login to view]("****" + " " + ((DeliverSM) pdu).debugString());

}

synchronized (requestEvents) {

[url removed, login to view](event);

[url removed, login to view]();

}

} else if ([url removed, login to view]()) {

[url removed, login to view]("async response received " + [url removed, login to view]());

if( pdu instanceof SubmitSMResp ){

[url removed, login to view] ( ">>>" + ((SubmitSMResp) pdu).getMessageId() +" "+ ((SubmitSMResp) pdu).debugString());

}

} else {

[url removed, login to view](

"pdu of unknown class (not request nor " + "response) received, discarding " + [url removed, login to view]());

}

}

/**

* Returns received pdu from the queue. If the queue is empty,

* the method blocks for the specified timeout.

*/

public ServerPDUEvent getRequestEvent(long timeout) {

ServerPDUEvent pduEvent = null;

synchronized (requestEvents) {

if ([url removed, login to view]()) {

try {

[url removed, login to view](timeout);

} catch (InterruptedException e) {

// ignoring, actually this is what we're waiting for

}

}

if (![url removed, login to view]()) {

pduEvent = (ServerPDUEvent) [url removed, login to view]();

}

}

return pduEvent;

}

}

Kemahiran: J2EE, Java

Lihat lebih lanjut: opensmpp, deliver_sm_resp, smpptestpdueventlistener, serverpdueventlistener, opensmpp serverpdueventlistener, pdu unknown class, pdu opensmpp, opensmpp pdu instanceof, pdu instanceof deliversm, opensmpp java, deliversm example opensmpp, deliver_sm, deliversm logica orgsmpppdu, opensmpp aynch, deliversm pdu, opensmpp response, opensmpp receive timeout, smppobject, opensmpp receiving problems, deliver_sm_resp perl, iprental timeout, opensmpp deliver_sm implementation, opensmpp delivery report information, pdu debugstring, opensmpp receive message

Tentang Majikan:
( 0 ulasan ) kl, Malaysia

ID Projek: #336885