com.alibaba.rocketmq.remoting.netty
类 NettyRemotingAbstract

java.lang.Object
  继承者 com.alibaba.rocketmq.remoting.netty.NettyRemotingAbstract
直接已知子类:
NettyRemotingClient, NettyRemotingServer

public abstract class NettyRemotingAbstract
extends Object

Server与Client公用抽象类

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

字段摘要
protected  Pair<NettyRequestProcessor,ExecutorService> defaultRequestProcessor
           
protected  com.alibaba.rocketmq.remoting.netty.NettyRemotingAbstract.NettyEventExecuter nettyEventExecuter
           
protected  HashMap<Integer,Pair<NettyRequestProcessor,ExecutorService>> processorTable
           
protected  ConcurrentHashMap<Integer,ResponseFuture> responseTable
           
protected  Semaphore semaphoreAsync
           
protected  Semaphore semaphoreOneway
           
 
构造方法摘要
NettyRemotingAbstract(int permitsOneway, int permitsAsync)
           
 
方法摘要
abstract  ExecutorService getCallbackExecutor()
           
abstract  ChannelEventListener getChannelEventListener()
           
abstract  RPCHook getRPCHook()
           
 void invokeAsyncImpl(io.netty.channel.Channel channel, RemotingCommand request, long timeoutMillis, InvokeCallback invokeCallback)
           
 void invokeOnewayImpl(io.netty.channel.Channel channel, RemotingCommand request, long timeoutMillis)
           
 RemotingCommand invokeSyncImpl(io.netty.channel.Channel channel, RemotingCommand request, long timeoutMillis)
           
 void processMessageReceived(io.netty.channel.ChannelHandlerContext ctx, RemotingCommand msg)
           
 void processRequestCommand(io.netty.channel.ChannelHandlerContext ctx, RemotingCommand cmd)
           
 void processResponseCommand(io.netty.channel.ChannelHandlerContext ctx, RemotingCommand cmd)
           
 void putNettyEvent(NettyEvent event)
           
 void scanResponseTable()
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

semaphoreOneway

protected final Semaphore semaphoreOneway

semaphoreAsync

protected final Semaphore semaphoreAsync

responseTable

protected final ConcurrentHashMap<Integer,ResponseFuture> responseTable

defaultRequestProcessor

protected Pair<NettyRequestProcessor,ExecutorService> defaultRequestProcessor

processorTable

protected final HashMap<Integer,Pair<NettyRequestProcessor,ExecutorService>> processorTable

nettyEventExecuter

protected final com.alibaba.rocketmq.remoting.netty.NettyRemotingAbstract.NettyEventExecuter nettyEventExecuter
构造方法详细信息

NettyRemotingAbstract

public NettyRemotingAbstract(int permitsOneway,
                             int permitsAsync)
方法详细信息

getChannelEventListener

public abstract ChannelEventListener getChannelEventListener()

getRPCHook

public abstract RPCHook getRPCHook()

putNettyEvent

public void putNettyEvent(NettyEvent event)

processRequestCommand

public void processRequestCommand(io.netty.channel.ChannelHandlerContext ctx,
                                  RemotingCommand cmd)

processResponseCommand

public void processResponseCommand(io.netty.channel.ChannelHandlerContext ctx,
                                   RemotingCommand cmd)

processMessageReceived

public void processMessageReceived(io.netty.channel.ChannelHandlerContext ctx,
                                   RemotingCommand msg)
                            throws Exception
抛出:
Exception

getCallbackExecutor

public abstract ExecutorService getCallbackExecutor()

scanResponseTable

public void scanResponseTable()

invokeSyncImpl

public RemotingCommand invokeSyncImpl(io.netty.channel.Channel channel,
                                      RemotingCommand request,
                                      long timeoutMillis)
                               throws InterruptedException,
                                      RemotingSendRequestException,
                                      RemotingTimeoutException
抛出:
InterruptedException
RemotingSendRequestException
RemotingTimeoutException

invokeAsyncImpl

public void invokeAsyncImpl(io.netty.channel.Channel channel,
                            RemotingCommand request,
                            long timeoutMillis,
                            InvokeCallback invokeCallback)
                     throws InterruptedException,
                            RemotingTooMuchRequestException,
                            RemotingTimeoutException,
                            RemotingSendRequestException
抛出:
InterruptedException
RemotingTooMuchRequestException
RemotingTimeoutException
RemotingSendRequestException

invokeOnewayImpl

public void invokeOnewayImpl(io.netty.channel.Channel channel,
                             RemotingCommand request,
                             long timeoutMillis)
                      throws InterruptedException,
                             RemotingTooMuchRequestException,
                             RemotingTimeoutException,
                             RemotingSendRequestException
抛出:
InterruptedException
RemotingTooMuchRequestException
RemotingTimeoutException
RemotingSendRequestException


Copyright © 2012-2015. All Rights Reserved.