T
- RPC typeC
- Remote connection typepublic abstract class RpcBus<T extends com.google.protobuf.Internal.EnumLite,C extends RemoteConnection> extends Object implements Closeable
Modifier and Type | Class and Description |
---|---|
class |
RpcBus.ChannelClosedHandler |
protected class |
RpcBus.InboundHandler |
Modifier and Type | Field and Description |
---|---|
protected SocketAddress |
local |
protected SocketAddress |
remote |
protected RpcConfig |
rpcConfig |
Modifier and Type | Method and Description |
---|---|
static <T> T |
get(io.netty.buffer.ByteBuf pBody,
com.google.protobuf.Parser<T> parser) |
protected io.netty.util.concurrent.GenericFutureListener<io.netty.channel.ChannelFuture> |
getCloseHandler(io.netty.channel.socket.SocketChannel channel,
C clientConnection) |
protected abstract com.google.protobuf.MessageLite |
getResponseDefaultInstance(int rpcType) |
protected abstract void |
handle(C connection,
int rpcType,
io.netty.buffer.ByteBuf pBody,
io.netty.buffer.ByteBuf dBody,
ResponseSender sender) |
protected abstract C |
initRemoteConnection(io.netty.channel.socket.SocketChannel channel) |
<SEND extends com.google.protobuf.MessageLite,RECEIVE extends com.google.protobuf.MessageLite> |
send(C connection,
T rpcType,
SEND protobufBody,
Class<RECEIVE> clazz,
io.netty.buffer.ByteBuf... dataBodies) |
<SEND extends com.google.protobuf.MessageLite,RECEIVE extends com.google.protobuf.MessageLite> |
send(RpcOutcomeListener<RECEIVE> listener,
C connection,
T rpcType,
SEND protobufBody,
Class<RECEIVE> clazz,
boolean allowInEventLoop,
io.netty.buffer.ByteBuf... dataBodies) |
<SEND extends com.google.protobuf.MessageLite,RECEIVE extends com.google.protobuf.MessageLite> |
send(RpcOutcomeListener<RECEIVE> listener,
C connection,
T rpcType,
SEND protobufBody,
Class<RECEIVE> clazz,
io.netty.buffer.ByteBuf... dataBodies) |
protected void |
setAddresses(SocketAddress remote,
SocketAddress local) |
protected final RpcConfig rpcConfig
protected volatile SocketAddress local
protected volatile SocketAddress remote
public RpcBus(RpcConfig rpcConfig)
protected abstract com.google.protobuf.MessageLite getResponseDefaultInstance(int rpcType) throws RpcException
RpcException
protected abstract void handle(C connection, int rpcType, io.netty.buffer.ByteBuf pBody, io.netty.buffer.ByteBuf dBody, ResponseSender sender) throws RpcException
RpcException
protected void setAddresses(SocketAddress remote, SocketAddress local)
public <SEND extends com.google.protobuf.MessageLite,RECEIVE extends com.google.protobuf.MessageLite> DrillRpcFuture<RECEIVE> send(C connection, T rpcType, SEND protobufBody, Class<RECEIVE> clazz, io.netty.buffer.ByteBuf... dataBodies)
public <SEND extends com.google.protobuf.MessageLite,RECEIVE extends com.google.protobuf.MessageLite> void send(RpcOutcomeListener<RECEIVE> listener, C connection, T rpcType, SEND protobufBody, Class<RECEIVE> clazz, io.netty.buffer.ByteBuf... dataBodies)
public <SEND extends com.google.protobuf.MessageLite,RECEIVE extends com.google.protobuf.MessageLite> void send(RpcOutcomeListener<RECEIVE> listener, C connection, T rpcType, SEND protobufBody, Class<RECEIVE> clazz, boolean allowInEventLoop, io.netty.buffer.ByteBuf... dataBodies)
protected abstract C initRemoteConnection(io.netty.channel.socket.SocketChannel channel)
protected io.netty.util.concurrent.GenericFutureListener<io.netty.channel.ChannelFuture> getCloseHandler(io.netty.channel.socket.SocketChannel channel, C clientConnection)
public static <T> T get(io.netty.buffer.ByteBuf pBody, com.google.protobuf.Parser<T> parser) throws RpcException
RpcException
Copyright © 1970 The Apache Software Foundation. All rights reserved.