Search in sources :

Example 1 with RoCreditControlMessage

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;
}
Also used : RoCreditControlMessage(net.java.slee.resource.diameter.ro.events.RoCreditControlMessage) RoCreditControlRequestImpl(org.mobicents.slee.resource.diameter.ro.events.RoCreditControlRequestImpl) Message(org.jdiameter.api.Message) DiameterMessage(net.java.slee.resource.diameter.base.events.DiameterMessage) RoCreditControlMessage(net.java.slee.resource.diameter.ro.events.RoCreditControlMessage) RoCreditControlAnswerImpl(org.mobicents.slee.resource.diameter.ro.events.RoCreditControlAnswerImpl)

Aggregations

DiameterMessage (net.java.slee.resource.diameter.base.events.DiameterMessage)1 RoCreditControlMessage (net.java.slee.resource.diameter.ro.events.RoCreditControlMessage)1 Message (org.jdiameter.api.Message)1 RoCreditControlAnswerImpl (org.mobicents.slee.resource.diameter.ro.events.RoCreditControlAnswerImpl)1 RoCreditControlRequestImpl (org.mobicents.slee.resource.diameter.ro.events.RoCreditControlRequestImpl)1