Search in sources :

Example 6 with InternalException

use of org.jdiameter.api.InternalException in project jain-slee.diameter by RestComm.

the class S6aServerSessionImpl method createPurgeUEAnswer.

public PurgeUEAnswer createPurgeUEAnswer() {
    // Make sure we have the correct type of Request
    if (!(lastRequest instanceof PurgeUERequest)) {
        logger.warn("Invalid type of answer for this activity.");
        return null;
    }
    try {
        // Create the answer
        PurgeUEAnswer aia = (PurgeUEAnswer) this.s6aMessageFactory.createS6aMessage(lastRequest.getHeader(), new DiameterAvp[] {}, PurgeUEAnswer.COMMAND_CODE, s6aMessageFactory.getApplicationId());
        // Fill session related AVPs, if present
        fillSessionAVPs(aia);
        return aia;
    } catch (InternalException e) {
        logger.error("Failed to create Purge-UE-Answer.", e);
    }
    return null;
}
Also used : DiameterAvp(net.java.slee.resource.diameter.base.events.avp.DiameterAvp) PurgeUEAnswer(net.java.slee.resource.diameter.s6a.events.PurgeUEAnswer) PurgeUERequest(net.java.slee.resource.diameter.s6a.events.PurgeUERequest) InternalException(org.jdiameter.api.InternalException)

Example 7 with InternalException

use of org.jdiameter.api.InternalException in project jain-slee.diameter by RestComm.

the class S6aServerSessionImpl method createNotifyAnswer.

public NotifyAnswer createNotifyAnswer() {
    // Make sure we have the correct type of Request
    if (!(lastRequest instanceof NotifyRequest)) {
        logger.warn("Invalid type of answer for this activity.");
        return null;
    }
    try {
        // Create the answer
        NotifyAnswer aia = (NotifyAnswer) this.s6aMessageFactory.createS6aMessage(lastRequest.getHeader(), new DiameterAvp[] {}, NotifyAnswer.COMMAND_CODE, s6aMessageFactory.getApplicationId());
        // Fill session related AVPs, if present
        fillSessionAVPs(aia);
        return aia;
    } catch (InternalException e) {
        logger.error("Failed to create Notify-Answer.", e);
    }
    return null;
}
Also used : DiameterAvp(net.java.slee.resource.diameter.base.events.avp.DiameterAvp) NotifyRequest(net.java.slee.resource.diameter.s6a.events.NotifyRequest) NotifyAnswer(net.java.slee.resource.diameter.s6a.events.NotifyAnswer) InternalException(org.jdiameter.api.InternalException)

Example 8 with InternalException

use of org.jdiameter.api.InternalException in project jain-slee.diameter by RestComm.

the class S13ServerSessionImpl method createMEIdentityCheckAnswer.

public MEIdentityCheckAnswer createMEIdentityCheckAnswer() {
    // Make sure we have the correct type of Request
    if (!(lastRequest instanceof MEIdentityCheckRequest)) {
        logger.warn("Invalid type of answer for this activity.");
        return null;
    }
    try {
        // Create the answer
        MEIdentityCheckAnswer eca = (MEIdentityCheckAnswer) this.s13MessageFactory.createS13Message(lastRequest.getHeader(), new DiameterAvp[] {}, MEIdentityCheckAnswer.COMMAND_CODE, s13MessageFactory.getApplicationId());
        // Fill session related AVPs, if present
        fillSessionAVPs(eca);
        return eca;
    } catch (InternalException e) {
        logger.error("Failed to create Authentication-Information-Answer.", e);
    }
    return null;
}
Also used : DiameterAvp(net.java.slee.resource.diameter.base.events.avp.DiameterAvp) MEIdentityCheckRequest(net.java.slee.resource.diameter.s13.events.MEIdentityCheckRequest) MEIdentityCheckAnswer(net.java.slee.resource.diameter.s13.events.MEIdentityCheckAnswer) InternalException(org.jdiameter.api.InternalException)

Example 9 with InternalException

use of org.jdiameter.api.InternalException in project jain-slee.diameter by RestComm.

the class S6aClientSessionImpl method createCancelLocationAnswer.

public CancelLocationAnswer createCancelLocationAnswer() {
    // Make sure we have the correct type of Request
    if (!(lastRequest instanceof CancelLocationRequest)) {
        logger.warn("Invalid type of answer for this activity.");
        return null;
    }
    try {
        // Create the answer
        CancelLocationAnswer cla = (CancelLocationAnswer) this.s6aMessageFactory.createS6aMessage(lastRequest.getHeader(), new DiameterAvp[] {}, CancelLocationAnswer.COMMAND_CODE, s6aMessageFactory.getApplicationId());
        // Fill session related AVPs, if present
        fillSessionAVPs(cla);
        return cla;
    } catch (InternalException e) {
        logger.error("Failed to create Cancel-Location-Answer.", e);
    }
    return null;
}
Also used : DiameterAvp(net.java.slee.resource.diameter.base.events.avp.DiameterAvp) CancelLocationRequest(net.java.slee.resource.diameter.s6a.events.CancelLocationRequest) CancelLocationAnswer(net.java.slee.resource.diameter.s6a.events.CancelLocationAnswer) InternalException(org.jdiameter.api.InternalException)

Example 10 with InternalException

use of org.jdiameter.api.InternalException in project jain-slee.diameter by RestComm.

the class S6aClientSessionImpl method createInsertSubscriberDataAnswer.

public InsertSubscriberDataAnswer createInsertSubscriberDataAnswer() {
    // Make sure we have the correct type of Request
    if (!(lastRequest instanceof InsertSubscriberDataRequest)) {
        logger.warn("Invalid type of answer for this activity.");
        return null;
    }
    try {
        // Create the answer
        InsertSubscriberDataAnswer ida = (InsertSubscriberDataAnswer) this.s6aMessageFactory.createS6aMessage(lastRequest.getHeader(), new DiameterAvp[] {}, InsertSubscriberDataAnswer.COMMAND_CODE, s6aMessageFactory.getApplicationId());
        // Fill session related AVPs, if present
        fillSessionAVPs(ida);
        return ida;
    } catch (InternalException e) {
        logger.error("Failed to create Insert-Subscriber-Data-Answer.", e);
    }
    return null;
}
Also used : InsertSubscriberDataAnswer(net.java.slee.resource.diameter.s6a.events.InsertSubscriberDataAnswer) InsertSubscriberDataRequest(net.java.slee.resource.diameter.s6a.events.InsertSubscriberDataRequest) DiameterAvp(net.java.slee.resource.diameter.base.events.avp.DiameterAvp) InternalException(org.jdiameter.api.InternalException)

Aggregations

InternalException (org.jdiameter.api.InternalException)19 DiameterAvp (net.java.slee.resource.diameter.base.events.avp.DiameterAvp)15 IllegalDiameterStateException (org.jdiameter.api.IllegalDiameterStateException)4 DiameterMessage (net.java.slee.resource.diameter.base.events.DiameterMessage)2 ApplicationId (org.jdiameter.api.ApplicationId)2 Message (org.jdiameter.api.Message)2 IOException (java.io.IOException)1 ObjectName (javax.management.ObjectName)1 InvalidConfigurationException (javax.slee.resource.InvalidConfigurationException)1 CreateActivityException (net.java.slee.resource.diameter.base.CreateActivityException)1 AvpNotAllowedException (net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException)1 LocationInfoAnswer (net.java.slee.resource.diameter.cxdx.events.LocationInfoAnswer)1 LocationInfoRequest (net.java.slee.resource.diameter.cxdx.events.LocationInfoRequest)1 MultimediaAuthenticationAnswer (net.java.slee.resource.diameter.cxdx.events.MultimediaAuthenticationAnswer)1 MultimediaAuthenticationRequest (net.java.slee.resource.diameter.cxdx.events.MultimediaAuthenticationRequest)1 PushProfileAnswer (net.java.slee.resource.diameter.cxdx.events.PushProfileAnswer)1 PushProfileRequest (net.java.slee.resource.diameter.cxdx.events.PushProfileRequest)1 RegistrationTerminationAnswer (net.java.slee.resource.diameter.cxdx.events.RegistrationTerminationAnswer)1 RegistrationTerminationRequest (net.java.slee.resource.diameter.cxdx.events.RegistrationTerminationRequest)1 ServerAssignmentAnswer (net.java.slee.resource.diameter.cxdx.events.ServerAssignmentAnswer)1