Search in sources :

Example 1 with RxAAAnswerImpl

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

the class RxServerSessionActivityImpl method sendAAAnswer.

/**
 * {@inheritDoc}
 */
@Override
public void sendAAAnswer(final AAAnswer aaa) throws IOException {
    fetchCurrentState(aaa);
    final DiameterMessageImpl msg = (DiameterMessageImpl) aaa;
    try {
        session.sendAAAnswer(new RxAAAnswerImpl((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 : AAAnswer(net.java.slee.resource.diameter.rx.events.AAAnswer) SessionTerminationAnswer(net.java.slee.resource.diameter.rx.events.SessionTerminationAnswer) Answer(org.jdiameter.api.Answer) RxAAAnswerImpl(org.jdiameter.common.impl.app.rx.RxAAAnswerImpl) IOException(java.io.IOException) DiameterMessageImpl(org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl) AvpNotAllowedException(net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException) AvpNotAllowedException(net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 AvpNotAllowedException (net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException)1 AAAnswer (net.java.slee.resource.diameter.rx.events.AAAnswer)1 SessionTerminationAnswer (net.java.slee.resource.diameter.rx.events.SessionTerminationAnswer)1 Answer (org.jdiameter.api.Answer)1 RxAAAnswerImpl (org.jdiameter.common.impl.app.rx.RxAAAnswerImpl)1 DiameterMessageImpl (org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl)1