Search in sources :

Example 1 with ProfileUpdateAnswerImpl

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

the class ShServerActivityImpl method sendProfileUpdateAnswer.

/*
   * (non-Javadoc)
   * @see net.java.slee.resource.diameter.sh.server.ShServerActivity#sendProfileUpdateAnswer(net.java.slee.resource.diameter.sh.events.ProfileUpdateAnswer)
   */
public void sendProfileUpdateAnswer(ProfileUpdateAnswer message) throws IOException {
    try {
        DiameterShMessageImpl msg = (DiameterShMessageImpl) message;
        fetchSessionData(msg, false);
        this.serverSession.sendProfileUpdateAnswer(new ProfileUpdateAnswerImpl((Answer) msg.getGenericData()));
        clean(msg);
    } catch (org.jdiameter.api.validation.AvpNotAllowedException e) {
        throw new AvpNotAllowedException("Message validation failed.", e, e.getAvpCode(), e.getVendorId());
    } catch (Exception e) {
        throw new IOException("Failed to send message, due to: " + e);
    }
}
Also used : Answer(org.jdiameter.api.Answer) SubscribeNotificationsAnswer(net.java.slee.resource.diameter.sh.events.SubscribeNotificationsAnswer) ProfileUpdateAnswer(net.java.slee.resource.diameter.sh.events.ProfileUpdateAnswer) UserDataAnswer(net.java.slee.resource.diameter.sh.events.UserDataAnswer) DiameterShMessageImpl(org.mobicents.slee.resource.diameter.sh.events.DiameterShMessageImpl) ProfileUpdateAnswerImpl(org.jdiameter.common.impl.app.sh.ProfileUpdateAnswerImpl) IOException(java.io.IOException) AvpNotAllowedException(net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException) AvpNotAllowedException(net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException) IOException(java.io.IOException)

Example 2 with ProfileUpdateAnswerImpl

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

the class ShServerSubscriptionActivityImpl method sendProfileUpdateAnswer.

/*
   * (non-Javadoc)
   * @see net.java.slee.resource.diameter.sh.server.ShServerSubscriptionActivity#sendProfileUpdateAnswer(net.java.slee.resource.diameter.sh.events.ProfileUpdateAnswer)
   */
public void sendProfileUpdateAnswer(ProfileUpdateAnswer message) throws IOException {
    try {
        DiameterShMessageImpl msg = (DiameterShMessageImpl) message;
        fetchSessionData(msg, false);
        this.serverSession.sendProfileUpdateAnswer(new ProfileUpdateAnswerImpl((Answer) msg.getGenericData()));
        clean(msg);
    } 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.", e);
        }
        throw new IOException("Failed to send message, due to: " + e);
    }
}
Also used : Answer(org.jdiameter.api.Answer) SubscribeNotificationsAnswer(net.java.slee.resource.diameter.sh.events.SubscribeNotificationsAnswer) ProfileUpdateAnswer(net.java.slee.resource.diameter.sh.events.ProfileUpdateAnswer) UserDataAnswer(net.java.slee.resource.diameter.sh.events.UserDataAnswer) DiameterShMessageImpl(org.mobicents.slee.resource.diameter.sh.events.DiameterShMessageImpl) ProfileUpdateAnswerImpl(org.jdiameter.common.impl.app.sh.ProfileUpdateAnswerImpl) IOException(java.io.IOException) 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)2 AvpNotAllowedException (net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException)2 ProfileUpdateAnswer (net.java.slee.resource.diameter.sh.events.ProfileUpdateAnswer)2 SubscribeNotificationsAnswer (net.java.slee.resource.diameter.sh.events.SubscribeNotificationsAnswer)2 UserDataAnswer (net.java.slee.resource.diameter.sh.events.UserDataAnswer)2 Answer (org.jdiameter.api.Answer)2 ProfileUpdateAnswerImpl (org.jdiameter.common.impl.app.sh.ProfileUpdateAnswerImpl)2 DiameterShMessageImpl (org.mobicents.slee.resource.diameter.sh.events.DiameterShMessageImpl)2