use of net.java.slee.resource.diameter.gx.GxServerSessionActivity in project jain-slee.diameter by RestComm.
the class DiameterGxResourceAdaptor method processRequest.
// NetworkReqListener Implementation -----------------------------------
public Answer processRequest(final Request request) {
if (tracer.isInfoEnabled()) {
tracer.info("Diameter Gx RA :: Got Request. Command-Code[" + request.getCommandCode() + "]");
}
// FIXME: baranowb: check if ACR is vald here also
if (request.getCommandCode() == GxCreditControlRequest.commandCode) {
DiameterActivity activity;
try {
activity = raProvider.createActivity(request);
if (activity == null) {
tracer.severe("Diameter Gx RA :: Failed to create session, Command-Code: " + request.getCommandCode() + ", Session-Id: " + request.getSessionId());
} else {
if (activity instanceof GxServerSessionActivity) {
final GxServerSessionActivityImpl session = (GxServerSessionActivityImpl) activity;
((ServerGxSessionImpl) session.getSession()).processRequest(request);
}
}
} catch (CreateActivityException e) {
tracer.severe("Failure trying to create Gx Activity.", e);
}
// Returning null so we can answer later
return null;
} else {
if (tracer.isInfoEnabled()) {
tracer.info("Diameter Gx RA :: Received unexpected Request. Either its not CCR or session should exist to handle this, Command-Code: " + request.getCommandCode() + ", Session-Id: " + request.getSessionId());
}
}
return null;
}
Aggregations