Search in sources :

Example 6 with SessionTerminationRequest

use of net.java.slee.resource.diameter.base.events.SessionTerminationRequest in project jain-slee.diameter by RestComm.

the class AuthClientSessionActivityImpl method createSessionTerminationRequest.

public SessionTerminationRequest createSessionTerminationRequest(TerminationCauseType terminationCause) {
    SessionTerminationRequest str = messageFactory.createSessionTerminationRequest();
    // Set Auth-Application-Id to 0 as specified
    str.setAuthApplicationId(0L);
    str.setTerminationCause(terminationCause);
    return str;
}
Also used : SessionTerminationRequest(net.java.slee.resource.diameter.base.events.SessionTerminationRequest)

Example 7 with SessionTerminationRequest

use of net.java.slee.resource.diameter.base.events.SessionTerminationRequest in project jain-slee.diameter by RestComm.

the class AuthServerSessionActivityImpl method createSessionTerminationAnswer.

public SessionTerminationAnswer createSessionTerminationAnswer() {
    // Create the request. // TODO Use request used to create this activity ?
    SessionTerminationRequest str = messageFactory.createSessionTerminationRequest();
    str.setAuthApplicationId(0L);
    return createSessionTerminationAnswer(str);
}
Also used : SessionTerminationRequest(net.java.slee.resource.diameter.base.events.SessionTerminationRequest)

Example 8 with SessionTerminationRequest

use of net.java.slee.resource.diameter.base.events.SessionTerminationRequest in project jain-slee.diameter by RestComm.

the class BaseFactoriesTest method hasTFlagSetSTA.

@Test
public void hasTFlagSetSTA() throws Exception {
    SessionTerminationRequest str = messageFactory.createSessionTerminationRequest();
    ((DiameterMessageImpl) str).getGenericData().setReTransmitted(true);
    assertTrue("The 'T' flag should be set in Session-Termination-Request", str.getHeader().isPotentiallyRetransmitted());
    SessionTerminationAnswer sta = messageFactory.createSessionTerminationAnswer(str);
    assertFalse("The 'T' flag should not be set in Session-Termination-Answer", sta.getHeader().isPotentiallyRetransmitted());
}
Also used : SessionTerminationAnswer(net.java.slee.resource.diameter.base.events.SessionTerminationAnswer) SessionTerminationRequest(net.java.slee.resource.diameter.base.events.SessionTerminationRequest) Test(org.junit.Test)

Aggregations

SessionTerminationRequest (net.java.slee.resource.diameter.base.events.SessionTerminationRequest)8 Test (org.junit.Test)5 SessionTerminationAnswer (net.java.slee.resource.diameter.base.events.SessionTerminationAnswer)2