- Common ways to obtain HttpClientActivity
private void myMethod () {HttpClientActivity h =
HttpClientResourceAdaptorSbbInterface httpClientResourceAdaptorSbbInterface;httpClientResourceAdaptorSbbInterface.createHttpClientActivity(true, null)
- Smart code suggestions by Codota
}
private void endHttpClientActivity(HttpClientActivity httpClientActivity) { if (httpClientActivity != null) { httpClientActivity.endActivity(); } }
public void onResponseEvent(ResponseEvent event, ActivityContextInterface aci) { HttpResponse response = event.getHttpResponse(); if (tracer.isInfoEnabled()) { tracer.info("[<<] Received HTTP Response. Status Code = " + response.getStatusLine().getStatusCode()); if (tracer.isFineEnabled()) { try { tracer.fine("[<<] Received HTTP Response. Response Body = [" + EntityUtils.toString(response.getEntity()) + "]"); } catch (Exception e) { tracer.severe("[xx] Failed reading response body", e); } } } // end http activity ((HttpClientActivity) aci.getActivity()).endActivity(); // call back parent HashMap params = (HashMap) event.getRequestApplicationData(); RatingInfo ratInfo = buildRatingInfo(response, params); final DiameterChargingServer parent = (DiameterChargingServer) sbbContext.getSbbLocalObject().getParent(); parent.getRateForServiceResult(ratInfo); }