Search in sources :

Example 1 with GxCreditControlMessage

use of net.java.slee.resource.diameter.gx.events.GxCreditControlMessage in project jain-slee.diameter by RestComm.

the class GxMessageFactoryImpl method createGxCreditControlRequest.

private GxCreditControlMessage createGxCreditControlRequest(final DiameterHeader diameterHeader, final DiameterAvp[] avps) throws IllegalArgumentException {
    boolean isRequest = false;
    if (diameterHeader == null) {
        isRequest = true;
    }
    GxCreditControlMessage msg = null;
    if (!isRequest) {
        final Message raw = createGxMessage(diameterHeader, avps, GxCreditControlRequest.commandCode);
        raw.setProxiable(true);
        raw.setRequest(false);
        // just in case. answers never have T flag set
        raw.setReTransmitted(false);
        msg = new GxCreditControlAnswerImpl(raw);
    } else {
        final Message raw = createGxMessage(null, avps, GxCreditControlRequest.commandCode);
        raw.setProxiable(true);
        raw.setRequest(true);
        msg = new GxCreditControlRequestImpl(raw);
    }
    return msg;
}
Also used : Message(org.jdiameter.api.Message) GxCreditControlMessage(net.java.slee.resource.diameter.gx.events.GxCreditControlMessage) DiameterMessage(net.java.slee.resource.diameter.base.events.DiameterMessage) GxReAuthMessage(net.java.slee.resource.diameter.gx.events.GxReAuthMessage) GxCreditControlMessage(net.java.slee.resource.diameter.gx.events.GxCreditControlMessage) GxCreditControlAnswerImpl(org.mobicents.slee.resource.diameter.gx.events.GxCreditControlAnswerImpl) GxCreditControlRequestImpl(org.mobicents.slee.resource.diameter.gx.events.GxCreditControlRequestImpl)

Aggregations

DiameterMessage (net.java.slee.resource.diameter.base.events.DiameterMessage)1 GxCreditControlMessage (net.java.slee.resource.diameter.gx.events.GxCreditControlMessage)1 GxReAuthMessage (net.java.slee.resource.diameter.gx.events.GxReAuthMessage)1 Message (org.jdiameter.api.Message)1 GxCreditControlAnswerImpl (org.mobicents.slee.resource.diameter.gx.events.GxCreditControlAnswerImpl)1 GxCreditControlRequestImpl (org.mobicents.slee.resource.diameter.gx.events.GxCreditControlRequestImpl)1