public abstract class AbstractRpcRemotingClient extends AbstractRpcRemoting implements RegisterMsgListener, ClientMessageSender
basketMap, channelHandlers, futures, idGenerator, isSending, mergeLock, mergeMsgMap, messageExecutor, nowMills, timerExecutor| 构造器和说明 |
|---|
AbstractRpcRemotingClient(NettyClientConfig nettyClientConfig,
io.netty.util.concurrent.EventExecutorGroup eventExecutorGroup,
ThreadPoolExecutor messageExecutor,
NettyPoolKey.TransactionRole transactionRole) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
destroy()
Destroy.
|
void |
destroyChannel(String serverAddress,
io.netty.channel.Channel channel)
Destroy channel.
|
void |
dispatch(RpcMessage request,
io.netty.channel.ChannelHandlerContext ctx)
Dispatch.
|
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
io.seata.core.rpc.netty.NettyClientChannelManager |
getClientChannelManager() |
ClientMessageListener |
getClientMessageListener()
Gets client message listener.
|
protected abstract Function<String,NettyPoolKey> |
getPoolKeyFunction()
Get pool key function.
|
protected abstract String |
getTransactionServiceGroup()
Get transaction service group.
|
void |
init()
Init.
|
Object |
sendMsgWithResponse(Object msg)
Send msg with response object.
|
Object |
sendMsgWithResponse(Object msg,
long timeout)
Send msg with response object.
|
Object |
sendMsgWithResponse(String serverAddress,
Object msg,
long timeout)
Send msg with response object.
|
void |
sendResponse(RpcMessage request,
String serverAddress,
Object msg)
Send response.
|
void |
setClientMessageListener(ClientMessageListener clientMessageListener)
Sets client message listener.
|
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt) |
addChannelPipelineLast, channelWritabilityChanged, close, destroyChannel, getAddressFromChannel, getAddressFromContext, getGroup, getNextMessageId, sendAsyncRequestWithoutResponse, sendAsyncRequestWithResponse, sendAsyncRequestWithResponse, sendRequest, sendResponse, setChannelHandlers, setGroupbind, connect, deregister, disconnect, flush, read, writechannelActive, channelReadComplete, channelRegistered, channelUnregisteredensureNotSharable, handlerAdded, handlerRemoved, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonRegisterMsgFail, onRegisterMsgSuccesspublic AbstractRpcRemotingClient(NettyClientConfig nettyClientConfig, io.netty.util.concurrent.EventExecutorGroup eventExecutorGroup, ThreadPoolExecutor messageExecutor, NettyPoolKey.TransactionRole transactionRole)
public io.seata.core.rpc.netty.NettyClientChannelManager getClientChannelManager()
protected abstract Function<String,NettyPoolKey> getPoolKeyFunction()
protected abstract String getTransactionServiceGroup()
public void init()
AbstractRpcRemotinginit 在类中 AbstractRpcRemotingpublic void destroy()
AbstractRpcRemotingdestroy 在接口中 Disposabledestroy 在类中 AbstractRpcRemotingpublic void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
throws Exception
channelRead 在接口中 io.netty.channel.ChannelInboundHandlerchannelRead 在类中 AbstractRpcRemotingExceptionpublic void dispatch(RpcMessage request, io.netty.channel.ChannelHandlerContext ctx)
AbstractRpcRemotingdispatch 在类中 AbstractRpcRemotingrequest - the requestctx - the ctxpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive 在接口中 io.netty.channel.ChannelInboundHandlerchannelInactive 在类中 io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt)
userEventTriggered 在接口中 io.netty.channel.ChannelInboundHandleruserEventTriggered 在类中 io.netty.channel.ChannelInboundHandlerAdapterpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
exceptionCaught 在接口中 io.netty.channel.ChannelHandlerexceptionCaught 在接口中 io.netty.channel.ChannelInboundHandlerexceptionCaught 在类中 AbstractRpcRemotingExceptionpublic Object sendMsgWithResponse(Object msg, long timeout) throws TimeoutException
ClientMessageSendersendMsgWithResponse 在接口中 ClientMessageSendermsg - the msgtimeout - the timeoutTimeoutException - the timeout exceptionpublic Object sendMsgWithResponse(Object msg) throws TimeoutException
ClientMessageSendersendMsgWithResponse 在接口中 ClientMessageSendermsg - the msgTimeoutException - the timeout exceptionpublic Object sendMsgWithResponse(String serverAddress, Object msg, long timeout) throws TimeoutException
ClientMessageSendersendMsgWithResponse 在接口中 ClientMessageSenderserverAddress - the server addressmsg - the msgtimeout - the timeoutTimeoutException - the timeout exceptionpublic void sendResponse(RpcMessage request, String serverAddress, Object msg)
ClientMessageSendersendResponse 在接口中 ClientMessageSenderrequest - the msg idserverAddress - the server addressmsg - the msgpublic ClientMessageListener getClientMessageListener()
public void setClientMessageListener(ClientMessageListener clientMessageListener)
clientMessageListener - the client message listenerpublic void destroyChannel(String serverAddress, io.netty.channel.Channel channel)
AbstractRpcRemotingdestroyChannel 在类中 AbstractRpcRemotingserverAddress - the server addresschannel - the channelCopyright © 2019 Seata. All rights reserved.