use of org.jdiameter.common.impl.app.sh.SubscribeNotificationsRequestImpl in project jain-slee.diameter by RestComm.
the class ShClientSubscriptionActivityImpl method sendUnsubscribeRequest.
/*
* (non-Javadoc)
* @see net.java.slee.resource.diameter.sh.ShClientSubscriptionActivity#sendUnsubscribeRequest()
*/
public void sendUnsubscribeRequest() throws IOException {
try {
SubscribeNotificationsRequest snr = this.messageFactory.createSubscribeNotificationsRequest(getSubscribedUserIdentity(), this.dataReferenceType[0], SubsReqType.UNSUBSCRIBE);
snr.setDataReferences(this.dataReferenceType);
snr.setDestinationRealm(remoteRealm);
snr.setAuthSessionState(authSessionState);
DiameterMessageImpl msg = (DiameterMessageImpl) snr;
this.clientSession.sendSubscribeNotificationsRequest(new SubscribeNotificationsRequestImpl((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 org.jdiameter.common.impl.app.sh.SubscribeNotificationsRequestImpl in project jain-slee.diameter by RestComm.
the class ShClientActivityImpl method sendSubscribeNotificationsRequest.
public void sendSubscribeNotificationsRequest(SubscribeNotificationsRequest message) throws IOException {
// FIXME: IMHO this should not be here.
try {
DiameterMessageImpl msg = (DiameterMessageImpl) message;
this.clientSession.sendSubscribeNotificationsRequest(new SubscribeNotificationsRequestImpl((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 org.jdiameter.common.impl.app.sh.SubscribeNotificationsRequestImpl 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());
}
}
Aggregations