Search in sources :

Example 1 with RfAccountingMessage

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;
}
Also used : RfAccountingMessage(net.java.slee.resource.diameter.rf.events.RfAccountingMessage) Message(org.jdiameter.api.Message) RfAccountingMessage(net.java.slee.resource.diameter.rf.events.RfAccountingMessage) RfAccountingAnswerImpl(org.mobicents.slee.resource.diameter.rf.events.RfAccountingAnswerImpl) RfAccountingRequestImpl(org.mobicents.slee.resource.diameter.rf.events.RfAccountingRequestImpl)

Aggregations

RfAccountingMessage (net.java.slee.resource.diameter.rf.events.RfAccountingMessage)1 Message (org.jdiameter.api.Message)1 RfAccountingAnswerImpl (org.mobicents.slee.resource.diameter.rf.events.RfAccountingAnswerImpl)1 RfAccountingRequestImpl (org.mobicents.slee.resource.diameter.rf.events.RfAccountingRequestImpl)1