use of org.jdiameter.common.impl.app.acc.AccountAnswerImpl in project jain-slee.diameter by RestComm.
the class AccountingServerSessionActivityImpl method sendAccountingAnswer.
public void sendAccountingAnswer(AccountingAnswer answer) throws IOException {
try {
AccountingAnswerImpl aca = (AccountingAnswerImpl) answer;
this.serverSession.sendAccountAnswer(new AccountAnswerImpl((Answer) aca.getGenericData()));
// FIXME: check this?
if (this.serverSession.isStateless()) {
endActivity();
} else if (aca.getAccountingRecordType() == AccountingRecordType.STOP_RECORD) {
endActivity();
}
} 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.getMessage());
}
}
Aggregations