use of net.java.slee.resource.diameter.cca.events.CreditControlMessage in project jain-slee.diameter by RestComm.
the class CreditControlMessageFactoryImpl method createCreditControlMessage.
// Private Methods -------------------------------------------------
private CreditControlMessage createCreditControlMessage(DiameterHeader diameterHeader, DiameterAvp[] avps) throws IllegalArgumentException {
// List<DiameterAvp> list = (List<DiameterAvp>) this.avpList.clone();
boolean isRequest = diameterHeader == null;
CreditControlMessage 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 CreditControlAnswerImpl(raw);
} else {
Message raw = createMessage(null, avps);
raw.setProxiable(true);
raw.setRequest(true);
msg = new CreditControlRequestImpl(raw);
}
return msg;
}
Aggregations