Search in sources :

Example 1 with RxSessionTermAnswerImpl

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

the class RxServerSessionActivityImpl method sendSessionTermAnswer.

/**
 * {@inheritDoc}
 */
@Override
public void sendSessionTermAnswer(final SessionTerminationAnswer sta) throws IOException {
    fetchCurrentState(sta);
    final DiameterMessageImpl msg = (DiameterMessageImpl) sta;
    try {
        session.sendSessionTermAnswer(new RxSessionTermAnswerImpl((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) RxSessionTermAnswerImpl(org.jdiameter.common.impl.app.rx.RxSessionTermAnswerImpl) 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 RxSessionTermAnswerImpl (org.jdiameter.common.impl.app.rx.RxSessionTermAnswerImpl)1 DiameterMessageImpl (org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl)1