use of javax.slee.resource.StartActivityException in project charging-server by RestComm.
the class HTTPClientSbb method getRateForServiceAsync.
public RatingInfo getRateForServiceAsync(HashMap params) {
String sessionIdFromRequest = params.get("SessionId").toString();
HttpClientActivity clientActivity = null;
try {
clientActivity = raSbbInterface.createHttpClientActivity(true, null);
} catch (StartActivityException e) {
tracer.severe("[xx] Failed creating HTTP Client Activity to send HTTP Request to Rating Engine.");
return new RatingInfo(-1, sessionIdFromRequest);
}
ActivityContextInterface clientAci = httpClientAci.getActivityContextInterface(clientActivity);
clientAci.attach(sbbContext.getSbbLocalObject());
params.put("startTime", System.currentTimeMillis());
HttpPost httpPost = buildHTTPRequest(params);
// Asynchronous call
clientActivity.execute(httpPost, params);
tracer.info("[>>] Sent HTTP Request to Rating Client in asynchronous mode.");
return null;
}
Aggregations