Search in sources :

Example 1 with PushNotificationRequestImpl

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

the class ShServerSubscriptionActivityImpl method sendPushNotificationRequest.

/*
   * (non-Javadoc)
   * @see net.java.slee.resource.diameter.sh.server.ShServerSubscriptionActivity#sendPushNotificationRequest(net.java.slee.resource.diameter.sh.events.PushNotificationRequest)
   */
public void sendPushNotificationRequest(PushNotificationRequest message) throws IOException {
    try {
        DiameterShMessageImpl msg = (DiameterShMessageImpl) message;
        fetchSessionData(msg, false);
        this.serverSession.sendPushNotificationRequest(new PushNotificationRequestImpl((Request) 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 : PushNotificationRequestImpl(org.jdiameter.common.impl.app.sh.PushNotificationRequestImpl) DiameterShMessageImpl(org.mobicents.slee.resource.diameter.sh.events.DiameterShMessageImpl) ProfileUpdateRequest(net.java.slee.resource.diameter.sh.events.ProfileUpdateRequest) SubscribeNotificationsRequest(net.java.slee.resource.diameter.sh.events.SubscribeNotificationsRequest) Request(org.jdiameter.api.Request) PushNotificationRequest(net.java.slee.resource.diameter.sh.events.PushNotificationRequest) UserDataRequest(net.java.slee.resource.diameter.sh.events.UserDataRequest) 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)1 AvpNotAllowedException (net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException)1 ProfileUpdateRequest (net.java.slee.resource.diameter.sh.events.ProfileUpdateRequest)1 PushNotificationRequest (net.java.slee.resource.diameter.sh.events.PushNotificationRequest)1 SubscribeNotificationsRequest (net.java.slee.resource.diameter.sh.events.SubscribeNotificationsRequest)1 UserDataRequest (net.java.slee.resource.diameter.sh.events.UserDataRequest)1 Request (org.jdiameter.api.Request)1 PushNotificationRequestImpl (org.jdiameter.common.impl.app.sh.PushNotificationRequestImpl)1 DiameterShMessageImpl (org.mobicents.slee.resource.diameter.sh.events.DiameterShMessageImpl)1