use of org.mobicents.smsc.slee.resources.scheduler.SendPduStatus2 in project smscgateway by RestComm.
the class RxSmppServerSbb method onSendPduStatusLocal.
private void onSendPduStatusLocal(final SendPduStatus event, final ActivityContextInterface aci) {
if (logger.isFineEnabled())
logger.fine("onSendPduStatusParent - refire to RxSmppServerChildSbb : activity=" + aci.getActivity());
RxSmppServerChildLocalObject rxSmppServerSbbLocalObject = this.getRxSmppServerChildSbbObject();
if (rxSmppServerSbbLocalObject != null) {
ActivityContextInterface act = getSchedulerActivityContextInterface();
if (act != null) {
try {
act.attach(rxSmppServerSbbLocalObject);
SendPduStatus2 event2 = new SendPduStatus2(event.getException(), event.getRequest(), event.getResponse(), event.getSystemId(), event.isSuccess());
SmsSet smsSet = getSmsSet();
Pdu pduEvent = event.getRequest();
if (event.getResponse() != null)
pduEvent = event.getResponse();
EsmeManagement esmeManagement = EsmeManagement.getInstance();
Boolean destAddressLimitationEnabled = false;
if (esmeManagement != null && smsSet != null) {
Esme esme = esmeManagement.getEsmeByName(smsSet.getDestEsmeName());
if (esme != null) {
destAddressLimitationEnabled = esme.getDestAddrSendLimit() != 0;
}
}
int realID = -1;
SentItemsList list = null;
if (destAddressLimitationEnabled) {
list = retreiveSentChunks();
for (int i = 0; i < list.getSentList().size(); i++) {
if (list.getSentList().get(i).getRemoteSequenceNumber() == pduEvent.getSequenceNumber()) {
realID = list.getSentList().get(i).getLocalSequenceNumber();
break;
}
}
} else {
realID = pduEvent.getSequenceNumber();
}
ConfirmMessageInSendingPool confirmMessageInSendingPool = null;
if (realID != -1)
confirmMessageInSendingPool = getMessageInSendingPoolBySeqNumber(realID);
fireSendPduStatusChild(event2, act, null);
} catch (IllegalStateException e) {
if (logger.isInfoEnabled())
logger.info("onSendPduStatus - IllegalStateException (activity is ending - dropping a SLEE event because it is not needed) : new activity=" + act.getActivity() + ", event=" + event);
}
}
}
}
Aggregations