Search in sources :

Example 31 with DiameterMessageImpl

use of org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl in project jain-slee.diameter by RestComm.

the class S6aClientSessionImpl method sendUpdateLocationRequest.

public void sendUpdateLocationRequest(UpdateLocationRequest ulr) throws IOException {
    DiameterMessageImpl msg = (DiameterMessageImpl) ulr;
    JUpdateLocationRequestImpl answer = new JUpdateLocationRequestImpl((Request) msg.getGenericData());
    try {
        appSession.sendUpdateLocationRequest(answer);
    } catch (org.jdiameter.api.validation.AvpNotAllowedException anae) {
        throw new AvpNotAllowedException(anae.getMessage(), anae.getAvpCode(), anae.getVendorId());
    } catch (Exception e) {
        if (logger.isDebugEnabled()) {
            logger.debug("Failed to send message.", e);
        }
        throw new IOException(e.getMessage());
    }
}
Also used : JUpdateLocationRequestImpl(org.jdiameter.common.impl.app.s6a.JUpdateLocationRequestImpl) 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) InternalException(org.jdiameter.api.InternalException) IOException(java.io.IOException)

Example 32 with DiameterMessageImpl

use of org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl in project jain-slee.diameter by RestComm.

the class S6aClientSessionImpl method sendCancelLocationAnswer.

public void sendCancelLocationAnswer(CancelLocationAnswer cla) throws IOException {
    DiameterMessageImpl msg = (DiameterMessageImpl) cla;
    JCancelLocationAnswerImpl request = new JCancelLocationAnswerImpl((Answer) msg.getGenericData());
    try {
        appSession.sendCancelLocationAnswer(request);
    } catch (org.jdiameter.api.validation.AvpNotAllowedException anae) {
        throw new AvpNotAllowedException(anae.getMessage(), anae.getAvpCode(), anae.getVendorId());
    } catch (Exception e) {
        if (logger.isDebugEnabled()) {
            logger.debug("Failed to send message.", e);
        }
        throw new IOException(e.getMessage());
    }
}
Also used : IOException(java.io.IOException) DiameterMessageImpl(org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl) AvpNotAllowedException(net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException) JCancelLocationAnswerImpl(org.jdiameter.common.impl.app.s6a.JCancelLocationAnswerImpl) AvpNotAllowedException(net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException) InternalException(org.jdiameter.api.InternalException) IOException(java.io.IOException)

Example 33 with DiameterMessageImpl

use of org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl in project jain-slee.diameter by RestComm.

the class S6aServerSessionImpl method sendCancelLocationRequest.

public void sendCancelLocationRequest(CancelLocationRequest clr) throws IOException {
    DiameterMessageImpl msg = (DiameterMessageImpl) clr;
    JCancelLocationRequestImpl request = new JCancelLocationRequestImpl((Answer) msg.getGenericData());
    try {
        appSession.sendCancelLocationRequest(request);
    } catch (org.jdiameter.api.validation.AvpNotAllowedException anae) {
        throw new AvpNotAllowedException(anae.getMessage(), anae.getAvpCode(), anae.getVendorId());
    } catch (Exception e) {
        if (logger.isDebugEnabled()) {
            logger.debug("Failed to send message.", e);
        }
        throw new IOException(e.getMessage());
    }
}
Also used : 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) InternalException(org.jdiameter.api.InternalException) IOException(java.io.IOException) JCancelLocationRequestImpl(org.jdiameter.common.impl.app.s6a.JCancelLocationRequestImpl)

Example 34 with DiameterMessageImpl

use of org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl in project jain-slee.diameter by RestComm.

the class S6aServerSessionImpl method sendAuthenticationInformationAnswer.

public void sendAuthenticationInformationAnswer(AuthenticationInformationAnswer aia) throws IOException {
    DiameterMessageImpl msg = (DiameterMessageImpl) aia;
    JAuthenticationInformationAnswerImpl answer = new JAuthenticationInformationAnswerImpl((Answer) msg.getGenericData());
    try {
        appSession.sendAuthenticationInformationAnswer(answer);
    } catch (org.jdiameter.api.validation.AvpNotAllowedException anae) {
        throw new AvpNotAllowedException(anae.getMessage(), anae.getAvpCode(), anae.getVendorId());
    } catch (Exception e) {
        if (logger.isDebugEnabled()) {
            logger.debug("Failed to send message.", e);
        }
        throw new IOException(e.getMessage());
    }
}
Also used : JAuthenticationInformationAnswerImpl(org.jdiameter.common.impl.app.s6a.JAuthenticationInformationAnswerImpl) 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) InternalException(org.jdiameter.api.InternalException) IOException(java.io.IOException)

Example 35 with DiameterMessageImpl

use of org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl in project jain-slee.diameter by RestComm.

the class S6aServerSessionImpl method sendPurgeUEAnswer.

public void sendPurgeUEAnswer(PurgeUEAnswer pua) throws IOException {
    DiameterMessageImpl msg = (DiameterMessageImpl) pua;
    JPurgeUEAnswerImpl answer = new JPurgeUEAnswerImpl((Answer) msg.getGenericData());
    try {
        appSession.sendPurgeUEAnswer(answer);
    } catch (org.jdiameter.api.validation.AvpNotAllowedException anae) {
        throw new AvpNotAllowedException(anae.getMessage(), anae.getAvpCode(), anae.getVendorId());
    } catch (Exception e) {
        if (logger.isDebugEnabled()) {
            logger.debug("Failed to send message.", e);
        }
        throw new IOException(e.getMessage());
    }
}
Also used : JPurgeUEAnswerImpl(org.jdiameter.common.impl.app.s6a.JPurgeUEAnswerImpl) 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) InternalException(org.jdiameter.api.InternalException) IOException(java.io.IOException)

Aggregations

DiameterMessageImpl (org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl)70 AvpNotAllowedException (net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException)63 IOException (java.io.IOException)62 InternalException (org.jdiameter.api.InternalException)30 Request (org.jdiameter.api.Request)17 DiameterException (net.java.slee.resource.diameter.base.DiameterException)12 Answer (org.jdiameter.api.Answer)11 SubscribeNotificationsRequest (net.java.slee.resource.diameter.sh.events.SubscribeNotificationsRequest)6 GxCreditControlRequest (net.java.slee.resource.diameter.gx.events.GxCreditControlRequest)5 CreditControlRequest (net.java.slee.resource.diameter.cca.events.CreditControlRequest)4 GxReAuthRequest (net.java.slee.resource.diameter.gx.events.GxReAuthRequest)4 RoCreditControlRequest (net.java.slee.resource.diameter.ro.events.RoCreditControlRequest)4 Message (org.jdiameter.api.Message)4 JCreditControlRequestImpl (org.jdiameter.common.impl.app.cca.JCreditControlRequestImpl)4 RoCreditControlRequestImpl (org.jdiameter.common.impl.app.ro.RoCreditControlRequestImpl)4 ArrayList (java.util.ArrayList)3 OperationNotSupportedException (javax.naming.OperationNotSupportedException)3 DiameterMessage (net.java.slee.resource.diameter.base.events.DiameterMessage)3 DiameterAvp (net.java.slee.resource.diameter.base.events.avp.DiameterAvp)3 ProfileUpdateRequest (net.java.slee.resource.diameter.sh.events.ProfileUpdateRequest)3