public abstract class AbstractRpcRemotingClient extends AbstractRpcRemoting implements RegisterMsgListener, ClientMessageSender
basketMap, futures, idGenerator, isSending, mergeLock, mergeMsgMap, messageExecutor, nowMills, timerExecutor| 构造器和说明 |
|---|
AbstractRpcRemotingClient(NettyClientConfig nettyClientConfig,
io.netty.util.concurrent.EventExecutorGroup eventExecutorGroup,
ThreadPoolExecutor messageExecutor,
NettyPoolKey.TransactionRole transactionRole) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
destroy()
Destroy.
|
void |
destroyChannel(String serverAddress,
io.netty.channel.Channel channel)
Destroy channel.
|
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.
|
defaultSendRequest, defaultSendResponse, destroyChannel, getAddressFromChannel, getAddressFromContext, getGroup, getNextMessageId, sendAsyncRequestWithoutResponse, sendAsyncRequestWithResponse, sendAsyncRequestWithResponse, setGroupclone, 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 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 © 2020 Seata. All rights reserved.