Tabnine Logo
ClientResponseInterceptor.handle
Code IndexAdd Tabnine to your IDE (free)

How to use
handle
method
in
com.github.kristofa.brave.ClientResponseInterceptor

Best Java code snippets using com.github.kristofa.brave.ClientResponseInterceptor.handle (Showing top 6 results out of 315)

origin: com.github.kristofa/brave-jaxrs2

  @Override
  public void filter(ClientRequestContext clientRequestContext, ClientResponseContext clientResponseContext) throws IOException {

    final HttpResponse response = new JaxRs2HttpResponse(clientResponseContext);
    responseInterceptor.handle(new HttpClientResponseAdapter(response));
  }
}
origin: smartthings.brave/smartthings-brave-asynchttpclient-common

synchronized void complete(HttpResponse response) {
 ClientResponseAdapter adapter = new HttpClientResponseAdapter(response);
 if (span != null) {
  spanThreadBinder.setCurrentSpan(span);
 }
 responseInterceptor.handle(adapter);
}
origin: jgchen/brave-dubbo

  @Override
  public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
    clientRequestInterceptor.handle(new DubboClientRequestAdapter(invoker,invocation));
    try{
      Result rpcResult = invoker.invoke(invocation);
      clientResponseInterceptor.handle(new DubboClientResponseAdapter(rpcResult));
      return rpcResult;
    }catch (Exception ex){
      clientResponseInterceptor.handle(new DubboClientResponseAdapter(ex));
      throw  ex;
    }finally {
      clientSpanThreadBinder.setCurrentSpan(null);
    }
  }
}
origin: xuminwlt/j360-dubbo-app-all

public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
  if ("com.alibaba.dubbo.monitor.MonitorService".equals(invoker.getInterface().getName())) {
    return invoker.invoke(invocation);
  }
  RpcContext context = RpcContext.getContext();
  clientRequestInterceptor.handle(new DubboClientRequestAdapter(context, invocation));
  Result result = invoker.invoke(invocation);
  clientResponseInterceptor.handle(new DubboClientResponseAdapter(result));
  return result;
}
origin: wso2/msf4j

  @Override
  public Response execute(Request request, Request.Options options) throws IOException {
    Map<String, Collection<String>> traceHeaders = new HashMap<>();
    traceHeaders.putAll(request.headers());
    Request wrappedRequest =
        Request.create(request.method(), request.url(), traceHeaders, request.body(), request.charset());
    HttpClientRequest httpClientRequest = new TraceableHttpClientRequest(wrappedRequest);
    ClientRequestAdapter adapter = new HttpClientRequestAdapter(httpClientRequest, new DefaultSpanNameProvider());
    requestInterceptor.handle(adapter);

    Response response = clientDelegate.execute(wrappedRequest, options);

    HttpResponse httpResponse = new TraceableHttpClientResponse(response);
    ClientResponseAdapter responseAdapter = new HttpClientResponseAdapter(httpResponse);
    responseInterceptor.handle(responseAdapter);
    return response;
  }
}
origin: blacklau/http-dubbo-zipkin

public Result invoke(Invoker<?> arg0, Invocation arg1) throws RpcException {
  clientRequestInterceptor.handle(new GrpcClientRequestAdapter(arg1));
  Map<String,String> att = arg1.getAttachments();
  final Span currentClientSpan = clientSpanThreadBinder.getCurrentClientSpan();
  Result result ;
  try {
    result =  arg0.invoke(arg1);
    clientSpanThreadBinder.setCurrentSpan(currentClientSpan);
    clientResponseInterceptor.handle(new GrpcClientResponseAdapter(result));
  } finally {
    clientSpanThreadBinder.setCurrentSpan(null);
  }
  return result;
}
com.github.kristofa.braveClientResponseInterceptorhandle

Javadoc

Handle a client response.

Popular methods of ClientResponseInterceptor

  • <init>

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • Menu (java.awt)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • JCheckBox (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Table (org.hibernate.mapping)
    A relational table
  • CodeWhisperer alternatives
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