public class BrpcPushProxy extends Object implements net.sf.cglib.proxy.MethodInterceptor
| Modifier | Constructor and Description |
|---|---|
protected |
BrpcPushProxy(CommunicationServer rpcServer,
Class clazz)
初始化时提前解析好method信息,在rpc交互时会更快。
|
| Modifier and Type | Method and Description |
|---|---|
void |
executeWithRetry(Request request,
Response response) |
static <T> T |
getProxy(CommunicationServer rpcServer,
Class clazz) |
Map<String,RpcMethodInfo> |
getRpcMethodMap() |
Object |
intercept(Object obj,
Method method,
Object[] args,
net.sf.cglib.proxy.MethodProxy proxy)
server push 调用用户接口时候, 实际执行的方法
|
protected void |
pushCore(Request request,
Response response) |
protected io.netty.channel.Channel |
selectChannel(Request request) |
protected BrpcPushProxy(CommunicationServer rpcServer, Class clazz)
rpcServer - rpcServerclazz - rpc接口类public static <T> T getProxy(CommunicationServer rpcServer, Class clazz)
public Object intercept(Object obj, Method method, Object[] args, net.sf.cglib.proxy.MethodProxy proxy) throws Throwable
intercept in interface net.sf.cglib.proxy.MethodInterceptorobj - method - args - proxy - Throwableprotected io.netty.channel.Channel selectChannel(Request request)
protected void pushCore(Request request, Response response) throws RpcException
RpcExceptionpublic Map<String,RpcMethodInfo> getRpcMethodMap()
Copyright © 2020 Baidu, Inc.. All rights reserved.