Search in sources :

Example 1 with GxCreditControlAnswerImpl

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

the class GxServerSessionActivityImpl method sendGxCreditControlAnswer.

/**
 * {@inheritDoc}
 */
@Override
public void sendGxCreditControlAnswer(final GxCreditControlAnswer cca) throws IOException {
    fetchCurrentState(cca);
    final DiameterMessageImpl msg = (DiameterMessageImpl) cca;
    try {
        session.sendCreditControlAnswer(new GxCreditControlAnswerImpl((Answer) msg.getGenericData()));
    } catch (org.jdiameter.api.validation.AvpNotAllowedException e) {
        final AvpNotAllowedException anae = new AvpNotAllowedException("Message validation failed.", e, e.getAvpCode(), e.getVendorId());
        throw anae;
    } catch (Exception e) {
        throw new IOException("Failed to send message.", e);
    }
}
Also used : GxCreditControlAnswer(net.java.slee.resource.diameter.gx.events.GxCreditControlAnswer) Answer(org.jdiameter.api.Answer) GxCreditControlAnswerImpl(org.jdiameter.common.impl.app.gx.GxCreditControlAnswerImpl) 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 GxCreditControlAnswer (net.java.slee.resource.diameter.gx.events.GxCreditControlAnswer)1 Answer (org.jdiameter.api.Answer)1 GxCreditControlAnswerImpl (org.jdiameter.common.impl.app.gx.GxCreditControlAnswerImpl)1 DiameterMessageImpl (org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl)1