use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class RoClientSessionActivityImpl method sendEventRoCreditControlRequest.
/*
* (non-Javadoc)
* @see net.java.slee.resource.diameter.ro.RoClientSessionActivity#sendEventRoCreditControlRequest(net.java.slee.resource.diameter.ro.events.RoCreditControlRequest)
*/
public void sendEventRoCreditControlRequest(RoCreditControlRequest ccr) throws IOException {
// fetchCurrentState(ccr);
DiameterMessageImpl msg = (DiameterMessageImpl) ccr;
validateState(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) {
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 RoClientSessionActivityImpl method sendTerminationRoCreditControlRequest.
/*
* (non-Javadoc)
* @see net.java.slee.resource.diameter.ro.RoClientSessionActivity#sendTerminationRoCreditControlRequest(net.java.slee.resource.diameter.ro.events.RoCreditControlRequest)
*/
public void sendTerminationRoCreditControlRequest(RoCreditControlRequest ccr) throws IOException {
// This should not be used to terminate sub-sessions!
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 net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class RxServerSessionActivityImpl method sendSessionTermAnswer.
/**
* {@inheritDoc}
*/
@Override
public void sendSessionTermAnswer(final SessionTerminationAnswer sta) throws IOException {
fetchCurrentState(sta);
final DiameterMessageImpl msg = (DiameterMessageImpl) sta;
try {
session.sendSessionTermAnswer(new RxSessionTermAnswerImpl((Answer) msg.getGenericData()));
} catch (org.jdiameter.api.validation.AvpNotAllowedException e) {
final AvpNotAllowedException anae = new AvpNotAllowedException("Message validation failed.", e, e.getAvpCode(), e.getVendorId());
throw anae;
} catch (Exception e) {
throw new IOException("Failed to send message.", e);
}
}
use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class S6aClientSessionImpl method sendPurgeUERequest.
public void sendPurgeUERequest(PurgeUERequest pur) throws IOException {
DiameterMessageImpl msg = (DiameterMessageImpl) pur;
JPurgeUERequestImpl answer = new JPurgeUERequestImpl((Request) msg.getGenericData());
try {
appSession.sendPurgeUERequest(answer);
} 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 net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class S6aClientSessionImpl method sendResetAnswer.
public void sendResetAnswer(ResetAnswer rsa) throws IOException {
DiameterMessageImpl msg = (DiameterMessageImpl) rsa;
JResetAnswerImpl request = new JResetAnswerImpl((Answer) msg.getGenericData());
try {
appSession.sendResetAnswer(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