Search in sources :

Example 1 with UserDataAnswerImpl

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

the class ShServerSubscriptionActivityImpl method sendUserDataAnswer.

/*
   * (non-Javadoc)
   * @see net.java.slee.resource.diameter.sh.server.ShServerSubscriptionActivity#sendUserDataAnswer(net.java.slee.resource.diameter.sh.events.UserDataAnswer)
   */
public void sendUserDataAnswer(UserDataAnswer message) throws IOException {
    try {
        DiameterShMessageImpl msg = (DiameterShMessageImpl) message;
        this.serverSession.sendUserDataAnswer(new UserDataAnswerImpl((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 : UserDataAnswerImpl(org.jdiameter.common.impl.app.sh.UserDataAnswerImpl) 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) 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 UserDataAnswerImpl

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

the class ShServerActivityImpl method sendUserDataAnswer.

/*
   * (non-Javadoc)
   * @see net.java.slee.resource.diameter.sh.server.ShServerActivity#sendUserDataAnswer(net.java.slee.resource.diameter.sh.events.UserDataAnswer)
   */
public void sendUserDataAnswer(UserDataAnswer message) throws IOException {
    try {
        DiameterShMessageImpl msg = (DiameterShMessageImpl) message;
        fetchSessionData(msg, false);
        this.serverSession.sendUserDataAnswer(new UserDataAnswerImpl((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 : UserDataAnswerImpl(org.jdiameter.common.impl.app.sh.UserDataAnswerImpl) 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) 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 UserDataAnswerImpl (org.jdiameter.common.impl.app.sh.UserDataAnswerImpl)2 DiameterShMessageImpl (org.mobicents.slee.resource.diameter.sh.events.DiameterShMessageImpl)2