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

  • Making http post requests using okhttp
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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