Search in sources :

Example 1 with RoCreditControlAnswerImpl

use of org.jdiameter.common.impl.app.ro.RoCreditControlAnswerImpl in project jain-slee.diameter by RestComm.

the class RoServerSessionActivityImpl method sendRoCreditControlAnswer.

/*
   * (non-Javadoc)
   * 
   * @see net.java.slee.resource.diameter.cca.CreditControlServerSession#
   * sendCreditControlAnswer
   * (net.java.slee.resource.diameter.cca.events.CreditControlAnswer)
   */
public void sendRoCreditControlAnswer(RoCreditControlAnswer cca) throws IOException {
    fetchCurrentState(cca);
    DiameterMessageImpl msg = (DiameterMessageImpl) cca;
    try {
        session.sendCreditControlAnswer(new RoCreditControlAnswerImpl((Answer) msg.getGenericData()));
    } catch (org.jdiameter.api.validation.AvpNotAllowedException e) {
        throw new AvpNotAllowedException("Message validation failed.", e, e.getAvpCode(), e.getVendorId());
    } catch (Exception e) {
        if (logger.isDebugEnabled()) {
            logger.debug("Failed to send message, due to: ", e);
        }
        throw new IOException("Failed to send message, due to: " + e);
    }
}
Also used : RoCreditControlAnswer(net.java.slee.resource.diameter.ro.events.RoCreditControlAnswer) Answer(org.jdiameter.api.Answer) RoCreditControlAnswerImpl(org.jdiameter.common.impl.app.ro.RoCreditControlAnswerImpl) IOException(java.io.IOException) DiameterMessageImpl(org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl) AvpNotAllowedException(net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException) IOException(java.io.IOException) AvpNotAllowedException(net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException)

Aggregations

IOException (java.io.IOException)1 AvpNotAllowedException (net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException)1 RoCreditControlAnswer (net.java.slee.resource.diameter.ro.events.RoCreditControlAnswer)1 Answer (org.jdiameter.api.Answer)1 RoCreditControlAnswerImpl (org.jdiameter.common.impl.app.ro.RoCreditControlAnswerImpl)1 DiameterMessageImpl (org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl)1