use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException 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);
}
}
use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class ShClientActivityImpl method sendUserDataRequest.
public void sendUserDataRequest(UserDataRequest message) throws IOException {
try {
DiameterMessageImpl msg = (DiameterMessageImpl) message;
this.clientSession.sendUserDataRequest(new UserDataRequestImpl((Request) msg.getGenericData()));
} 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);
}
}
use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class ShClientActivityImpl method sendProfileUpdateRequest.
public void sendProfileUpdateRequest(ProfileUpdateRequest message) throws IOException {
try {
DiameterMessageImpl msg = (DiameterMessageImpl) message;
clientSession.sendProfileUpdateRequest(new ProfileUpdateRequestImpl((Request) msg.getGenericData()));
} 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.getLocalizedMessage());
}
}
use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class ShClientSubscriptionActivityImpl method sendSubscribeNotificationsRequest.
/*
* (non-Javadoc)
* @see net.java.slee.resource.diameter.sh.ShClientSubscriptionActivity#sendSubscribeNotificationsRequest(net.java.slee.resource.diameter.sh.server.events.SubscribeNotificationsRequest)
*/
public void sendSubscribeNotificationsRequest(SubscribeNotificationsRequest request) throws IOException {
try {
DiameterMessageImpl msg = (DiameterMessageImpl) request;
this.clientSession.sendSubscribeNotificationsRequest(new SubscribeNotificationsRequestImpl((Request) msg.getGenericData()));
fetchSessionData(msg, false);
} 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.getLocalizedMessage());
}
}
use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class ShClientSubscriptionActivityImpl method sendPushNotificationAnswer.
/*
* (non-Javadoc)
* @see net.java.slee.resource.diameter.sh.ShClientSubscriptionActivity#sendPushNotificationAnswer(net.java.slee.resource.diameter.sh.server.events.PushNotificationAnswer)
*/
public void sendPushNotificationAnswer(PushNotificationAnswer answer) throws IOException {
try {
DiameterMessageImpl msg = (DiameterMessageImpl) answer;
this.clientSession.sendPushNotificationAnswer(new PushNotificationAnswerImpl((Answer) msg.getGenericData()));
clean((DiameterShMessageImpl) answer);
fetchSessionData(answer, false);
} catch (org.jdiameter.api.validation.AvpNotAllowedException e) {
throw new AvpNotAllowedException("Message validation failed.", e, e.getAvpCode(), e.getVendorId());
} catch (Exception e) {
// FIXME: extent this exception to add trace....
throw new IOException("Failed to send message, due to: " + e.getLocalizedMessage());
}
}
Aggregations