use of net.java.slee.resource.diameter.base.events.avp.DiameterAvp in project jain-slee.diameter by RestComm.
the class GqMessageFactoryImpl method createMessage.
public Message createMessage(DiameterHeader header, DiameterAvp[] avps) throws AvpNotAllowedException {
Message msg = createRawMessage(header);
AvpSet set = msg.getAvps();
for (DiameterAvp avp : avps) {
addAvp(avp, set);
}
return msg;
}
use of net.java.slee.resource.diameter.base.events.avp.DiameterAvp in project jain-slee.diameter by RestComm.
the class GqMessageFactoryImpl method createMessage.
public Message createMessage(int commandCode, DiameterAvp[] avps) throws AvpNotAllowedException {
Message msg = createRawMessage(commandCode);
AvpSet set = msg.getAvps();
for (DiameterAvp avp : avps) {
addAvp(avp, set);
}
return msg;
}
use of net.java.slee.resource.diameter.base.events.avp.DiameterAvp in project jain-slee.diameter by RestComm.
the class RfMessageFactoryImpl method createRfAccountingRequest.
public RfAccountingRequest createRfAccountingRequest(AccountingRecordType accountingrecordtype) {
DiameterAvp[] avps = new DiameterAvp[] {};
RfAccountingRequest acr = (RfAccountingRequest) createRfAccountingMessage(null, avps);
if (this.sessionId != null) {
acr.setSessionId(sessionId);
}
// acr.setAcctApplicationId(_RF_ACC_APP_ID);
acr.setAccountingRecordType(accountingrecordtype);
return acr;
}
use of net.java.slee.resource.diameter.base.events.avp.DiameterAvp in project jain-slee.diameter by RestComm.
the class RfMessageFactoryImpl method createMessage.
public Message createMessage(DiameterHeader header, DiameterAvp[] avps) throws AvpNotAllowedException {
Message msg = createRawMessage(header);
AvpSet set = msg.getAvps();
for (DiameterAvp avp : avps) {
addAvp(avp, set);
}
return msg;
}
use of net.java.slee.resource.diameter.base.events.avp.DiameterAvp in project jain-slee.diameter by RestComm.
the class RfMessageFactoryImpl method addAvp.
protected void addAvp(DiameterAvp avp, AvpSet set) {
// FIXME: alexandre: Should we look at the types and add them with proper function?
if (avp instanceof GroupedAvp) {
AvpSet avpSet = set.addGroupedAvp(avp.getCode(), avp.getVendorId(), avp.getMandatoryRule() == 1, avp.getProtectedRule() == 1);
DiameterAvp[] groupedAVPs = ((GroupedAvp) avp).getExtensionAvps();
for (DiameterAvp avpFromGroup : groupedAVPs) {
addAvp(avpFromGroup, avpSet);
}
} else if (avp != null) {
set.addAvp(avp.getCode(), avp.byteArrayValue(), avp.getVendorId(), avp.getMandatoryRule() == 1, avp.getProtectedRule() == 1);
}
}
Aggregations