public class ServerTraceInterceptor extends AbstractInterceptor
This interceptor is just a placeholder for integration with tracing tools using AOP.
| Constructor and Description |
|---|
ServerTraceInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
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 in interface InterceptorhandleRequest in class 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 in interface InterceptorhandleResponse in class 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 RpcException
InterceptoraroundProcess in interface InterceptoraroundProcess in class AbstractInterceptorresponse - sync result or async futurechain - interceptor chainRpcExceptionCopyright © 2020 Baidu, Inc.. All rights reserved.