use of net.java.slee.resource.diameter.cca.CreditControlServerSession in project jain-slee.diameter by RestComm.
the class DiameterCCAResourceAdaptor method processRequest.
// NetworkReqListener Implementation -----------------------------------
public Answer processRequest(Request request) {
// FIXME: baranowb: check if ACR is vald here also
if (request.getCommandCode() == CreditControlRequest.commandCode) {
DiameterActivity activity;
try {
activity = raProvider.createActivity(request);
if (activity == null) {
tracer.severe("Diameter CCA RA :: Failed to create session, Command-Code: " + request.getCommandCode() + ", Session-Id: " + request.getSessionId());
} else {
// We can only have server session?, but for sake error catching
if (activity instanceof CreditControlServerSession) {
CreditControlServerSessionImpl session = (CreditControlServerSessionImpl) activity;
((ServerCCASessionImpl) session.getSession()).processRequest(request);
}
}
} catch (CreateActivityException e) {
tracer.severe("Failure trying to create CCA Activity.", e);
}
} else {
tracer.severe("Diameter CCA RA :: Received unexpected Request. Either its not CCR or session should exist to handle this, Command-Code: " + request.getCommandCode() + ", Session-Id: " + request.getSessionId());
}
// Returning null so we can answer later
return null;
}
Aggregations