首页 \ 问答 \ Netty 4 ChannelInboundMessageHandlerAdapter(Netty 4 ChannelInboundMessageHandlerAdapter)

Netty 4 ChannelInboundMessageHandlerAdapter(Netty 4 ChannelInboundMessageHandlerAdapter)

当这个类被实例化并连接到管道时,实际上会调用哪类ChannelInboundMessageHandlerAdapter ? 显然messageReceived是(如Netty 3中的情况)。 其文档中列出的其他方法如何?

为了处理消息,实现必须覆盖除messageReceived之外的任何其他方法吗?


Which methods of class ChannelInboundMessageHandlerAdapter will actually get called when this class has been instantiated and connected to a pipeline? obviously messageReceived is (as was the case in Netty 3). What about the other methods listed on its documentation?

Must an implementation override any of its other methods other than messageReceived in order to process messages?


原文:https://stackoverflow.com/questions/14978959
更新时间:2019-12-07 05:38

最满意答案

您只需覆盖messageReceived即可处理消息。 如果你想要一些“特殊”处理,你可以“覆盖”其他人。


You only need to override messageReceived to process messages. You "can" override others if you want some "special" handling.

相关问答

更多