Tabnine Logo
HttpClientActivity
Code IndexAdd Tabnine to your IDE (free)

How to use
HttpClientActivity
in
net.java.client.slee.resource.http

Best Java code snippets using net.java.client.slee.resource.http.HttpClientActivity (Showing top 6 results out of 315)

origin: org.restcomm.camelgw/sbbs

private void endHttpClientActivity(HttpClientActivity httpClientActivity) {
  if (httpClientActivity != null) {
    httpClientActivity.endActivity();
  }
}

origin: org.mobicents.applications/charging-server-sbb

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;
}
origin: org.mobicents.servers.jainslee.enablers/restcomm-slee-enabler-rest-client-sbb

activity.execute(httpRequest, request);
origin: org.mobicents.servers.jainslee.enablers/mobicents-slee-enabler-rest-client-sbb

activity.execute(httpRequest, request);
origin: org.mobicents.applications/charging-server-sbb

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);
}
origin: org.restcomm.camelgw/sbbs

/**
 * Private methods
 */
private void sendXmlPayload(byte[] data) throws Exception {
  HttpClientActivity httpClientActivity = this.getHTTPClientActivity();
  if (httpClientActivity == null) {
    httpClientActivity = this.httpClientProvider.createHttpClientActivity(false, null);
    this.httpClientActivityContextInterfaceFactory.getActivityContextInterface(httpClientActivity).attach(
        this.sbbContext.getSbbLocalObject());
  }
  this.httpClientActivityContextInterfaceFactory.getActivityContextInterface(httpClientActivity).attach(
      this.sbbContext.getSbbLocalObject());
  String route = this.getNetworkRoutingRule().getRuleUrl();
  HttpPost uriRequest = createRequest(route, null, ACCEPTED_CONTENT_TYPE, null);
  // NOTE: here we assume that its text/xml utf8 encoded... bum.
  pushContent(uriRequest, ACCEPTED_CONTENT_TYPE, CONTENT_ENCODING, data);
  if (logger.isFineEnabled()) {
    logger.fine("Executing HttpPost=" + uriRequest + "\n" + new String(data));
  }
  httpClientActivity.execute(uriRequest, null);
}
net.java.client.slee.resource.httpHttpClientActivity

Most used methods

  • execute
  • endActivity

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now