use of org.jdiameter.api.InternalException in project jain-slee.diameter by RestComm.
the class S6aClientSessionImpl method createResetAnswer.
public ResetAnswer createResetAnswer() {
// Make sure we have the correct type of Request
if (!(lastRequest instanceof ResetRequest)) {
logger.warn("Invalid type of answer for this activity.");
return null;
}
try {
// Create the answer
ResetAnswer rsa = (ResetAnswer) this.s6aMessageFactory.createS6aMessage(lastRequest.getHeader(), new DiameterAvp[] {}, ResetAnswer.COMMAND_CODE, s6aMessageFactory.getApplicationId());
// Fill session related AVPs, if present
fillSessionAVPs(rsa);
return rsa;
} catch (InternalException e) {
logger.error("Failed to create Reset-Answer.", e);
}
return null;
}
use of org.jdiameter.api.InternalException in project jain-slee.diameter by RestComm.
the class S6aServerSessionImpl method createUpdateLocationAnswer.
public UpdateLocationAnswer createUpdateLocationAnswer() {
// Make sure we have the correct type of Request
if (!(lastRequest instanceof UpdateLocationRequest)) {
logger.warn("Invalid type of answer for this activity.");
return null;
}
try {
// Create the answer
UpdateLocationAnswer aia = (UpdateLocationAnswer) this.s6aMessageFactory.createS6aMessage(lastRequest.getHeader(), new DiameterAvp[] {}, UpdateLocationAnswer.COMMAND_CODE, s6aMessageFactory.getApplicationId());
// Fill session related AVPs, if present
fillSessionAVPs(aia);
return aia;
} catch (InternalException e) {
logger.error("Failed to create Update-Location-Answer.", e);
}
return null;
}
use of org.jdiameter.api.InternalException in project jain-slee.diameter by RestComm.
the class S6aServerSessionImpl method createAuthenticationInformationAnswer.
public AuthenticationInformationAnswer createAuthenticationInformationAnswer() {
// Make sure we have the correct type of Request
if (!(lastRequest instanceof AuthenticationInformationRequest)) {
logger.warn("Invalid type of answer for this activity.");
return null;
}
try {
// Create the answer
AuthenticationInformationAnswer aia = (AuthenticationInformationAnswer) this.s6aMessageFactory.createS6aMessage(lastRequest.getHeader(), new DiameterAvp[] {}, AuthenticationInformationAnswer.COMMAND_CODE, s6aMessageFactory.getApplicationId());
// Fill session related AVPs, if present
fillSessionAVPs(aia);
return aia;
} catch (InternalException e) {
logger.error("Failed to create Authentication-Information-Answer.", e);
}
return null;
}
use of org.jdiameter.api.InternalException in project jain-slee.diameter by RestComm.
the class CxDxServerSessionImpl method createServerAssignmentAnswer.
/*
* (non-Javadoc)
* @see net.java.slee.resource.diameter.cxdx.CxDxServerSession#createServerAssignmentAnswer()
*/
public ServerAssignmentAnswer createServerAssignmentAnswer() {
// Make sure we have the correct type of Request
if (!(lastRequest instanceof ServerAssignmentRequest)) {
logger.warn("Invalid type of answer for this activity.");
return null;
}
try {
// Create the answer
ServerAssignmentAnswer saa = (ServerAssignmentAnswer) this.cxdxMessageFactory.createCxDxMessage(lastRequest.getHeader(), new DiameterAvp[] {}, ServerAssignmentAnswer.COMMAND_CODE, cxdxMessageFactory.getApplicationId());
// Fill session related AVPs, if present
fillSessionAVPs(saa);
return saa;
} catch (InternalException e) {
logger.error("Failed to create Server-Assignment-Answer.", e);
}
return null;
}
use of org.jdiameter.api.InternalException in project jain-slee.diameter by RestComm.
the class CxDxServerSessionImpl method createUserAuthorizationAnswer.
/*
* (non-Javadoc)
* @see net.java.slee.resource.diameter.cxdx.CxDxServerSession#createUserAuthorizationAnswer()
*/
public UserAuthorizationAnswer createUserAuthorizationAnswer() {
// Make sure we have the correct type of Request
if (!(lastRequest instanceof UserAuthorizationRequest)) {
logger.warn("Invalid type of answer for this activity. Type: " + lastRequest);
return null;
}
try {
// Create the answer
UserAuthorizationAnswer uaa = (UserAuthorizationAnswer) this.cxdxMessageFactory.createCxDxMessage(lastRequest.getHeader(), new DiameterAvp[] {}, UserAuthorizationAnswer.COMMAND_CODE, cxdxMessageFactory.getApplicationId());
// Fill session related AVPs, if present
fillSessionAVPs(uaa);
return uaa;
} catch (InternalException e) {
logger.error("Failed to create User-Authorization-Answer.", e);
}
return null;
}
Aggregations