use of org.mobicents.slee.resource.diameter.base.DiameterActivityImpl in project jain-slee.diameter by RestComm.
the class DiameterRfResourceAdaptor method processRequest.
// NetworkReqListener Implementation -----------------------------------
/*
* (non-Javadoc)
* @see org.jdiameter.api.NetworkReqListener#processRequest(org.jdiameter.api.Request)
*/
public Answer processRequest(Request request) {
DiameterActivityImpl activity;
try {
activity = (DiameterActivityImpl) raProvider.createActivity(request);
if (activity instanceof RfServerSessionActivityImpl) {
RfServerSessionActivityImpl assai = (RfServerSessionActivityImpl) activity;
((ServerRfSessionImpl) assai.getSession()).processRequest(request);
} else if (activity instanceof RfClientSessionActivityImpl) {
RfClientSessionActivityImpl assai = (RfClientSessionActivityImpl) activity;
((ClientRfSessionImpl) assai.getSession()).processRequest(request);
}
} catch (CreateActivityException e) {
tracer.severe("Failure trying to create Rf Activity.", e);
}
// returning null so we can answer later
return null;
}
use of org.mobicents.slee.resource.diameter.base.DiameterActivityImpl in project jain-slee.diameter by RestComm.
the class DiameterRfResourceAdaptor method queryLiveness.
// Mandatory callback methods ------------------------------------------
public void queryLiveness(ActivityHandle handle) {
tracer.info("Diameter Rf RA :: queryLiveness :: handle[" + handle + "].");
if (!(handle instanceof DiameterActivityHandle)) {
return;
}
DiameterActivityImpl activity = (DiameterActivityImpl) activities.get((DiameterActivityHandle) handle);
if (activity != null && !activity.isValid()) {
try {
sleeEndpoint.endActivity(handle);
} catch (Exception e) {
tracer.severe("Failure ending non-live activity.", e);
}
}
}
Aggregations