use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class GxClientSessionActivityImpl method sendTerminationGxCreditControlRequest.
/*
* (non-Javadoc)
* @see net.java.slee.resource.diametergx.GxClientSessionActivity#sendTerminationRoCreditControlRequest(net.java.slee.resource.diameter.gx.events.GxCreditControlRequest)
*/
public void sendTerminationGxCreditControlRequest(final GxCreditControlRequest ccr) throws IOException {
// This should not be used to terminate sub-sessions!
validateState(ccr);
final DiameterMessageImpl msg = (DiameterMessageImpl) ccr;
try {
session.sendCreditControlRequest(new GxCreditControlRequestImpl((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 GxClientSessionActivityImpl method sendInitialGxCreditControlRequest.
/*
* (non-Javadoc)
* @see net.java.slee.resource.diametergx.GxClientSessionActivity#sendInitialRoCreditControlRequest(net.java.slee.resource.diameter.gx.events.GxCreditControlRequest)
*/
public void sendInitialGxCreditControlRequest(final GxCreditControlRequest ccr) throws IOException {
// FIXME: should this affect FSM ?
validateState(ccr);
final DiameterMessageImpl msg = (DiameterMessageImpl) ccr;
try {
session.sendCreditControlRequest(new GxCreditControlRequestImpl((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 GxClientSessionActivityImpl method sendEventGxCreditControlRequest.
/*
* (non-Javadoc)
* @see net.java.slee.resource.diametergx.GxClientSessionActivity#sendEventGxCreditControlRequest(net.java.slee.resource.diameter.gx.events.GxCreditControlRequest)
*/
public void sendEventGxCreditControlRequest(final GxCreditControlRequest ccr) throws IOException {
// fetchCurrentState(ccr);
final DiameterMessageImpl msg = (DiameterMessageImpl) ccr;
validateState(ccr);
try {
session.sendCreditControlRequest(new GxCreditControlRequestImpl((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 GxServerSessionActivityImpl method sendGxCreditControlAnswer.
/**
* {@inheritDoc}
*/
@Override
public void sendGxCreditControlAnswer(final GxCreditControlAnswer cca) throws IOException {
fetchCurrentState(cca);
final DiameterMessageImpl msg = (DiameterMessageImpl) cca;
try {
session.sendCreditControlAnswer(new GxCreditControlAnswerImpl((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 RfServerSessionActivityImpl method sendRfAccountingAnswer.
public void sendRfAccountingAnswer(RfAccountingAnswer answer) throws IOException {
try {
RfAccountingAnswerImpl aca = (RfAccountingAnswerImpl) answer;
this.serverSession.sendAccountAnswer(new org.jdiameter.common.impl.app.rf.RfAccountingAnswerImpl((Answer) aca.getGenericData()));
// FIXME: check this?
if (isTerminateAfterProcessing()) {
endActivity();
// this.serverSession.release();
//
// if(!serverSession.isValid()) {
// String sessionId =
// this.serverSession.getSessions().get(0).getSessionId();
// this.baseListener.sessionDestroyed(sessionId,
// this.serverSession);
// }
}
// clean
clean(aca);
} 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