use of org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl in project jain-slee.diameter by RestComm.
the class S6aServerSessionImpl method sendInsertSubscriberDataRequest.
public void sendInsertSubscriberDataRequest(InsertSubscriberDataRequest idr) throws IOException {
DiameterMessageImpl msg = (DiameterMessageImpl) idr;
JInsertSubscriberDataRequestImpl request = new JInsertSubscriberDataRequestImpl((Answer) msg.getGenericData());
try {
appSession.sendInsertSubscriberDataRequest(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 S6aServerSessionImpl method sendResetRequest.
public void sendResetRequest(ResetRequest rsr) throws IOException {
DiameterMessageImpl msg = (DiameterMessageImpl) rsr;
JResetRequestImpl request = new JResetRequestImpl((Answer) msg.getGenericData());
try {
appSession.sendResetRequest(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 RoClientSessionActivityImpl method sendUpdateRoCreditControlRequest.
/*
* (non-Javadoc)
* @see net.java.slee.resource.diameter.ro.RoClientSessionActivity#sendUpdateRoCreditControlRequest(net.java.slee.resource.diameter.ro.events.RoCreditControlRequest)
*/
public void sendUpdateRoCreditControlRequest(RoCreditControlRequest ccr) throws IOException {
validateState(ccr);
DiameterMessageImpl msg = (DiameterMessageImpl) ccr;
try {
session.sendCreditControlRequest(new RoCreditControlRequestImpl((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 RoClientSessionActivityImpl method sendInitialRoCreditControlRequest.
/*
* (non-Javadoc)
* @see net.java.slee.resource.diameter.ro.RoClientSessionActivity#sendInitialRoCreditControlRequest(net.java.slee.resource.diameter.ro.events.RoCreditControlRequest)
*/
public void sendInitialRoCreditControlRequest(RoCreditControlRequest ccr) throws IOException {
// FIXME: should this affect FSM ?
validateState(ccr);
DiameterMessageImpl msg = (DiameterMessageImpl) ccr;
try {
session.sendCreditControlRequest(new RoCreditControlRequestImpl((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 RoServerSessionActivityImpl method sendRoCreditControlAnswer.
/*
* (non-Javadoc)
*
* @see net.java.slee.resource.diameter.cca.CreditControlServerSession#
* sendCreditControlAnswer
* (net.java.slee.resource.diameter.cca.events.CreditControlAnswer)
*/
public void sendRoCreditControlAnswer(RoCreditControlAnswer cca) throws IOException {
fetchCurrentState(cca);
DiameterMessageImpl msg = (DiameterMessageImpl) cca;
try {
session.sendCreditControlAnswer(new RoCreditControlAnswerImpl((Answer) msg.getGenericData()));
} 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, due to: ", e);
}
throw new IOException("Failed to send message, due to: " + e);
}
}
Aggregations