use of net.java.slee.resource.diameter.gx.events.GxCreditControlMessage in project jain-slee.diameter by RestComm.
the class GxMessageFactoryImpl method createGxCreditControlRequest.
private GxCreditControlMessage createGxCreditControlRequest(final DiameterHeader diameterHeader, final DiameterAvp[] avps) throws IllegalArgumentException {
boolean isRequest = false;
if (diameterHeader == null) {
isRequest = true;
}
GxCreditControlMessage msg = null;
if (!isRequest) {
final Message raw = createGxMessage(diameterHeader, avps, GxCreditControlRequest.commandCode);
raw.setProxiable(true);
raw.setRequest(false);
// just in case. answers never have T flag set
raw.setReTransmitted(false);
msg = new GxCreditControlAnswerImpl(raw);
} else {
final Message raw = createGxMessage(null, avps, GxCreditControlRequest.commandCode);
raw.setProxiable(true);
raw.setRequest(true);
msg = new GxCreditControlRequestImpl(raw);
}
return msg;
}
Aggregations