public interface Interceptor
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
handleRequest(RpcRequest rpcRequest)
This method is called in two scenarios:
Before the client sends the request;
Before the server processes the request.
|
void |
handleResponse(RpcResponse response)
This method is called in two scenarios:
Before the server sends the response;
After the client receives the response.
|
boolean handleRequest(RpcRequest rpcRequest)
rpcRequest - request content, when the business is implemented, it needs to be converted into the type
required by the specific protocol.void handleResponse(RpcResponse response)
response - server response content, when the business is implemented, it needs to be converted into the typeCopyright © 2018 Baidu, Inc.. All rights reserved.