use of org.jdiameter.api.Message in project jain-slee.diameter by RestComm.
the class GqMessageFactoryImpl method createGqAbortSessionRequest.
@Override
public GqAbortSessionRequest createGqAbortSessionRequest(String sessionId) {
Message raw = createRequest(GqAbortSessionRequest.COMMAND_CODE, new DiameterAvp[] {});
GqAbortSessionRequest asr = new GqAbortSessionRequestImpl(raw);
asr.setSessionId(sessionId);
addOrigin(asr);
return asr;
}
use of org.jdiameter.api.Message in project jain-slee.diameter by RestComm.
the class GqMessageFactoryImpl method createGqSessionTerminationRequest.
@Override
public GqSessionTerminationRequest createGqSessionTerminationRequest() {
Message raw = createRequest(GqSessionTerminationRequest.COMMAND_CODE, new DiameterAvp[] {});
GqSessionTerminationRequest str = new GqSessionTerminationRequestImpl(raw);
if (sessionId != null) {
str.setSessionId(sessionId);
}
addOrigin(str);
return str;
}
use of org.jdiameter.api.Message in project jain-slee.diameter by RestComm.
the class GqMessageFactoryImpl method createGqAbortSessionRequest.
@Override
public GqAbortSessionRequest createGqAbortSessionRequest() {
Message raw = createRequest(GqAbortSessionRequest.COMMAND_CODE, new DiameterAvp[] {});
GqAbortSessionRequest asr = new GqAbortSessionRequestImpl(raw);
if (sessionId != null) {
asr.setSessionId(sessionId);
}
addOrigin(asr);
return asr;
}
use of org.jdiameter.api.Message in project jain-slee.diameter by RestComm.
the class GqMessageFactoryImpl method createGqAARequest.
@Override
public GqAARequest createGqAARequest(String sessionId) {
Message raw = createRequest(GqAARequest.COMMAND_CODE, new DiameterAvp[] {});
GqAARequest aar = new GqAARequestImpl(raw);
aar.setSessionId(sessionId);
addOrigin(aar);
return aar;
}
use of org.jdiameter.api.Message in project jain-slee.diameter by RestComm.
the class GqMessageFactoryImpl method createGqAbortSessionAnswer.
@Override
public GqAbortSessionAnswer createGqAbortSessionAnswer(GqAbortSessionRequest asr) {
Message raw = createMessage(asr.getHeader(), new DiameterAvp[] {});
// this should be different ...
raw.setRequest(false);
// just in case. answers never have T flag set
raw.setReTransmitted(false);
GqAbortSessionAnswerImpl asa = new GqAbortSessionAnswerImpl(raw);
asa.getGenericData().getAvps().removeAvp(DiameterAvpCodes.DESTINATION_HOST);
asa.getGenericData().getAvps().removeAvp(DiameterAvpCodes.DESTINATION_REALM);
asa.getGenericData().getAvps().removeAvp(DiameterAvpCodes.ORIGIN_HOST);
asa.getGenericData().getAvps().removeAvp(DiameterAvpCodes.ORIGIN_REALM);
asa.setSessionId(asr.getSessionId());
addOrigin(asa);
return asa;
}
Aggregations