use of org.mobicents.smsc.mproc.impl.PostHrSriProcessorImpl in project smscgateway by RestComm.
the class MProcManagement method applyMProcHrSri.
public MProcResult applyMProcHrSri(final MProcRuleRaProvider anMProcRuleRa, CorrelationIdValue correlationIdValue) {
if (this.mprocs.size() == 0) {
return new MProcResult();
}
FastList<MProcRule> cur = this.mprocs;
PostHrSriProcessorImpl pap = new PostHrSriProcessorImpl(logger);
MProcMessage message = new MProcMessageHrImpl(correlationIdValue);
try {
for (FastList.Node<MProcRule> n = cur.head(), end = cur.tail(); (n = n.getNext()) != end; ) {
MProcRule rule = n.getValue();
if (rule.isForPostHrSriState() && rule.matchesPostHrSri(message)) {
if (logger.isDebugEnabled()) {
logger.debug("MRule matches at HrSri phase to a message: rule: " + rule + "correlationIdValue: " + correlationIdValue);
}
rule.onPostHrSri(anMProcRuleRa, pap, message);
}
}
} catch (Throwable e) {
logger.error("Exception when invoking rule.matches(message) or onPostHrSri(): " + e.getMessage(), e);
return new MProcResult();
}
MProcResult res = new MProcResult();
if (pap.isHrByPassed()) {
res.setHrIsByPassed(true);
}
return res;
}
Aggregations