use of org.jdiameter.common.impl.app.gx.GxCreditControlRequestImpl in project jain-slee.diameter by RestComm.
the class GxClientSessionActivityImpl method sendUpdateGxCreditControlRequest.
/*
* (non-Javadoc)
* @see net.java.slee.resource.diametergx.GxClientSessionActivity#sendUpdateRoCreditControlRequest(net.java.slee.resource.diameter.gx.events.GxCreditControlRequest)
*/
public void sendUpdateGxCreditControlRequest(final GxCreditControlRequest ccr) throws IOException {
// FIXME: Should this come already in the CCR?
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 org.jdiameter.common.impl.app.gx.GxCreditControlRequestImpl 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 org.jdiameter.common.impl.app.gx.GxCreditControlRequestImpl 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 org.jdiameter.common.impl.app.gx.GxCreditControlRequestImpl 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);
}
}
Aggregations