Search in sources :

Example 1 with GxReAuthMessage

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

the class GxMessageFactoryImpl method createGxReAuthRequest.

private GxReAuthMessage createGxReAuthRequest(final DiameterHeader diameterHeader, final DiameterAvp[] avps) throws IllegalArgumentException {
    boolean isRequest = false;
    if (diameterHeader == null) {
        isRequest = true;
    }
    GxReAuthMessage msg = null;
    if (!isRequest) {
        final Message raw = createGxMessage(diameterHeader, avps, GxReAuthAnswer.commandCode);
        raw.setProxiable(true);
        raw.setRequest(false);
        // just in case. answers never have T flag set
        raw.setReTransmitted(false);
        msg = new GxReAuthAnswerImpl(raw);
    } else {
        final Message raw = createGxMessage(null, avps, GxReAuthRequest.commandCode);
        raw.setProxiable(true);
        raw.setRequest(true);
        msg = new GxReAuthRequestImpl(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) GxReAuthRequestImpl(org.mobicents.slee.resource.diameter.gx.events.GxReAuthRequestImpl) GxReAuthMessage(net.java.slee.resource.diameter.gx.events.GxReAuthMessage) GxReAuthAnswerImpl(org.mobicents.slee.resource.diameter.gx.events.GxReAuthAnswerImpl)

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 GxReAuthAnswerImpl (org.mobicents.slee.resource.diameter.gx.events.GxReAuthAnswerImpl)1 GxReAuthRequestImpl (org.mobicents.slee.resource.diameter.gx.events.GxReAuthRequestImpl)1