use of org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl in project jain-slee.diameter by RestComm.
the class S6aServerSessionImpl method sendDeleteSubscriberDataRequest.
public void sendDeleteSubscriberDataRequest(DeleteSubscriberDataRequest dsr) throws IOException {
DiameterMessageImpl msg = (DiameterMessageImpl) dsr;
JDeleteSubscriberDataRequestImpl request = new JDeleteSubscriberDataRequestImpl((Answer) msg.getGenericData());
try {
appSession.sendDeleteSubscriberDataRequest(request);
} catch (org.jdiameter.api.validation.AvpNotAllowedException anae) {
throw new AvpNotAllowedException(anae.getMessage(), anae.getAvpCode(), anae.getVendorId());
} catch (Exception e) {
if (logger.isDebugEnabled()) {
logger.debug("Failed to send message.", e);
}
throw new IOException(e.getMessage());
}
}
use of org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl 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.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl 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.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl in project jain-slee.diameter by RestComm.
the class S6aClientSessionImpl method sendDeleteSubscriberDataAnswer.
public void sendDeleteSubscriberDataAnswer(DeleteSubscriberDataAnswer dsa) throws IOException {
DiameterMessageImpl msg = (DiameterMessageImpl) dsa;
JDeleteSubscriberDataAnswerImpl request = new JDeleteSubscriberDataAnswerImpl((Answer) msg.getGenericData());
try {
appSession.sendDeleteSubscriberDataAnswer(request);
} catch (org.jdiameter.api.validation.AvpNotAllowedException anae) {
throw new AvpNotAllowedException(anae.getMessage(), anae.getAvpCode(), anae.getVendorId());
} catch (Exception e) {
if (logger.isDebugEnabled()) {
logger.debug("Failed to send message.", e);
}
throw new IOException(e.getMessage());
}
}
use of org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl in project jain-slee.diameter by RestComm.
the class S6aClientSessionImpl method sendInsertSubscriberDataAnswer.
public void sendInsertSubscriberDataAnswer(InsertSubscriberDataAnswer ida) throws IOException {
DiameterMessageImpl msg = (DiameterMessageImpl) ida;
JInsertSubscriberDataAnswerImpl request = new JInsertSubscriberDataAnswerImpl((Answer) msg.getGenericData());
try {
appSession.sendInsertSubscriberDataAnswer(request);
} catch (org.jdiameter.api.validation.AvpNotAllowedException anae) {
throw new AvpNotAllowedException(anae.getMessage(), anae.getAvpCode(), anae.getVendorId());
} catch (Exception e) {
if (logger.isDebugEnabled()) {
logger.debug("Failed to send message.", e);
}
throw new IOException(e.getMessage());
}
}
Aggregations