use of org.jdiameter.common.impl.app.cca.JCreditControlAnswerImpl in project jain-slee.diameter by RestComm.
the class CreditControlServerSessionImpl method sendCreditControlAnswer.
/*
* (non-Javadoc)
*
* @see net.java.slee.resource.diameter.cca.CreditControlServerSession#sendCreditControlAnswer(net.java.slee.resource.diameter.cca.events.CreditControlAnswer)
*/
public void sendCreditControlAnswer(CreditControlAnswer cca) throws IOException {
fetchCurrentState(cca);
DiameterMessageImpl msg = (DiameterMessageImpl) cca;
try {
session.sendCreditControlAnswer(new JCreditControlAnswerImpl((Answer) msg.getGenericData()));
} catch (org.jdiameter.api.validation.AvpNotAllowedException e) {
AvpNotAllowedException anae = new AvpNotAllowedException("Message validation failed.", e, e.getAvpCode(), e.getVendorId());
throw anae;
} catch (Exception e) {
e.printStackTrace();
IOException ioe = new IOException("Failed to send message, due to: " + e);
throw ioe;
}
}
Aggregations