use of net.java.slee.resource.diameter.rf.events.RfAccountingMessage in project jain-slee.diameter by RestComm.
the class RfMessageFactoryImpl method createRfAccountingMessage.
protected RfAccountingMessage createRfAccountingMessage(DiameterHeader diameterHeader, DiameterAvp[] avps) throws IllegalArgumentException {
// List<DiameterAvp> list = (List<DiameterAvp>) this.avpList.clone();
boolean isRequest = diameterHeader == null;
RfAccountingMessage 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 RfAccountingAnswerImpl(raw);
} else {
Message raw = createMessage(null, avps);
raw.setProxiable(true);
raw.setRequest(true);
msg = new RfAccountingRequestImpl(raw);
}
return msg;
}
Aggregations