public class ClientTraceInterceptor extends AbstractInterceptor
This interceptor is just a placeholder for integration with tracing tools using AOP.
| 构造器和说明 |
|---|
ClientTraceInterceptor() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
aroundProcess(Request request,
Response response,
InterceptorChain chain)
The around intercept for RPC methods.
|
boolean |
handleRequest(Request request)
This method is called in two scenarios:
Before the client sends the request;
Before the server processes the request.
|
void |
handleResponse(Response response)
This method is called in two scenarios:
Before the server sends the response;
After the client receives the response.
|
public boolean handleRequest(Request request)
InterceptorhandleRequest 在接口中 InterceptorhandleRequest 在类中 AbstractInterceptorrequest - request content, when the business is implemented, it needs to be converted into the type
required by the specific protocol.public void handleResponse(Response response)
InterceptorhandleResponse 在接口中 InterceptorhandleResponse 在类中 AbstractInterceptorresponse - server response content, when the business is implemented, it needs to be converted into the typepublic void aroundProcess(Request request, Response response, InterceptorChain chain) throws Exception
InterceptoraroundProcess 在接口中 InterceptoraroundProcess 在类中 AbstractInterceptorresponse - sync result or async futurechain - interceptor chainExceptionCopyright © 2019 Baidu, Inc.. All rights reserved.