@InterfaceAudience.Private public abstract class RpcDispatcher extends io.netty.channel.SimpleChannelInboundHandler<Object>
protected void handle(ChannelHandlerContext, MessageType)Where "MessageType" must match exactly the type of the message to handle. Polymorphism is not supported. Handlers can return a value, which becomes the RPC reply; if a null is returned, then a reply is still sent, with an empty payload.
| Constructor and Description |
|---|
RpcDispatcher() |
| Modifier and Type | Method and Description |
|---|---|
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
protected String |
name()
Override this to add a name to the dispatcher, for debugging purposes.
|
acceptInboundMessage, channelReadchannelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredhandlerAdded, handlerRemoved, isSharableprotected String name()
protected final void channelRead0(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
throws Exception
public final void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterCopyright © 2017 The Apache Software Foundation. All rights reserved.