use of net.java.slee.resource.diameter.ro.events.RoCreditControlMessage in project jain-slee.diameter by RestComm.
the class RoMessageFactoryImpl method createRoCreditControlRequest.
private RoCreditControlMessage createRoCreditControlRequest(DiameterHeader diameterHeader, DiameterAvp[] avps) throws IllegalArgumentException {
// List<DiameterAvp> list = (List<DiameterAvp>) this.avpList.clone();
boolean isRequest = diameterHeader == null;
RoCreditControlMessage msg = null;
if (!isRequest) {
Message raw = createMessage(diameterHeader, avps);
raw.setProxiable(diameterHeader.isProxiable());
raw.setRequest(false);
// just in case. answers never have T flag set
raw.setReTransmitted(false);
msg = new RoCreditControlAnswerImpl(raw);
} else {
Message raw = createMessage(null, avps);
raw.setProxiable(true);
raw.setRequest(true);
msg = new RoCreditControlRequestImpl(raw);
}
return msg;
}
Aggregations