com.alibaba.rocketmq.remoting.netty
类 NettyRemotingClient

java.lang.Object
  继承者 com.alibaba.rocketmq.remoting.netty.NettyRemotingAbstract
      继承者 com.alibaba.rocketmq.remoting.netty.NettyRemotingClient
所有已实现的接口:
RemotingClient, RemotingService

public class NettyRemotingClient
extends NettyRemotingAbstract
implements RemotingClient

Remoting客户端实现

从以下版本开始:
2013-7-13
作者:
shijia.wxr

字段摘要
 
从类 com.alibaba.rocketmq.remoting.netty.NettyRemotingAbstract 继承的字段
defaultRequestProcessor, nettyEventExecuter, processorTable, responseTable, semaphoreAsync, semaphoreOneway
 
构造方法摘要
NettyRemotingClient(NettyClientConfig nettyClientConfig)
           
NettyRemotingClient(NettyClientConfig nettyClientConfig, ChannelEventListener channelEventListener)
           
 
方法摘要
 void closeChannel(io.netty.channel.Channel channel)
           
 void closeChannel(String addr, io.netty.channel.Channel channel)
           
 ExecutorService getCallbackExecutor()
           
 ChannelEventListener getChannelEventListener()
           
 List<String> getNameServerAddressList()
           
 List<String> getNamesrvAddrList()
           
 RPCHook getRpcHook()
           
 RPCHook getRPCHook()
           
 void invokeAsync(String addr, RemotingCommand request, long timeoutMillis, InvokeCallback invokeCallback)
           
 void invokeOneway(String addr, RemotingCommand request, long timeoutMillis)
           
 RemotingCommand invokeSync(String addr, RemotingCommand request, long timeoutMillis)
           
 boolean isChannelWriteable(String addr)
           
 void registerProcessor(int requestCode, NettyRequestProcessor processor, ExecutorService executor)
           
 void registerRPCHook(RPCHook rpcHook)
           
 void shutdown()
           
 void start()
           
 void updateNameServerAddressList(List<String> addrs)
           
 
从类 com.alibaba.rocketmq.remoting.netty.NettyRemotingAbstract 继承的方法
invokeAsyncImpl, invokeOnewayImpl, invokeSyncImpl, processMessageReceived, processRequestCommand, processResponseCommand, putNettyEvent, scanResponseTable
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

NettyRemotingClient

public NettyRemotingClient(NettyClientConfig nettyClientConfig)

NettyRemotingClient

public NettyRemotingClient(NettyClientConfig nettyClientConfig,
                           ChannelEventListener channelEventListener)
方法详细信息

start

public void start()
指定者:
接口 RemotingService 中的 start

shutdown

public void shutdown()
指定者:
接口 RemotingService 中的 shutdown

closeChannel

public void closeChannel(String addr,
                         io.netty.channel.Channel channel)

closeChannel

public void closeChannel(io.netty.channel.Channel channel)

registerProcessor

public void registerProcessor(int requestCode,
                              NettyRequestProcessor processor,
                              ExecutorService executor)
指定者:
接口 RemotingClient 中的 registerProcessor

invokeSync

public RemotingCommand invokeSync(String addr,
                                  RemotingCommand request,
                                  long timeoutMillis)
                           throws InterruptedException,
                                  RemotingConnectException,
                                  RemotingSendRequestException,
                                  RemotingTimeoutException
指定者:
接口 RemotingClient 中的 invokeSync
抛出:
InterruptedException
RemotingConnectException
RemotingSendRequestException
RemotingTimeoutException

invokeAsync

public void invokeAsync(String addr,
                        RemotingCommand request,
                        long timeoutMillis,
                        InvokeCallback invokeCallback)
                 throws InterruptedException,
                        RemotingConnectException,
                        RemotingTooMuchRequestException,
                        RemotingTimeoutException,
                        RemotingSendRequestException
指定者:
接口 RemotingClient 中的 invokeAsync
抛出:
InterruptedException
RemotingConnectException
RemotingTooMuchRequestException
RemotingTimeoutException
RemotingSendRequestException

invokeOneway

public void invokeOneway(String addr,
                         RemotingCommand request,
                         long timeoutMillis)
                  throws InterruptedException,
                         RemotingConnectException,
                         RemotingTooMuchRequestException,
                         RemotingTimeoutException,
                         RemotingSendRequestException
指定者:
接口 RemotingClient 中的 invokeOneway
抛出:
InterruptedException
RemotingConnectException
RemotingTooMuchRequestException
RemotingTimeoutException
RemotingSendRequestException

getCallbackExecutor

public ExecutorService getCallbackExecutor()
指定者:
NettyRemotingAbstract 中的 getCallbackExecutor

updateNameServerAddressList

public void updateNameServerAddressList(List<String> addrs)
指定者:
接口 RemotingClient 中的 updateNameServerAddressList

getChannelEventListener

public ChannelEventListener getChannelEventListener()
指定者:
NettyRemotingAbstract 中的 getChannelEventListener

getNamesrvAddrList

public List<String> getNamesrvAddrList()

getNameServerAddressList

public List<String> getNameServerAddressList()
指定者:
接口 RemotingClient 中的 getNameServerAddressList

getRpcHook

public RPCHook getRpcHook()

registerRPCHook

public void registerRPCHook(RPCHook rpcHook)
指定者:
接口 RemotingService 中的 registerRPCHook

getRPCHook

public RPCHook getRPCHook()
指定者:
NettyRemotingAbstract 中的 getRPCHook

isChannelWriteable

public boolean isChannelWriteable(String addr)
指定者:
接口 RemotingClient 中的 isChannelWriteable


Copyright © 2012-2015. All Rights Reserved.