类 MsgEncoder

  • 所有已实现的接口:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelOutboundHandler, Serializable

    @Sharable
    public class MsgEncoder
    extends io.netty.handler.codec.MessageToByteEncoder<Msg>
    implements Serializable
    对于发出的消息进行编码
    另请参阅:
    序列化表格
    • 嵌套类概要

      • 从接口继承的嵌套类/接口 io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • 构造器概要

      构造器 
      构造器 说明
      MsgEncoder()  
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      protected void encode​(io.netty.channel.ChannelHandlerContext ctx, Msg msg, io.netty.buffer.ByteBuf out)  
      boolean isSharable()  
      • 从类继承的方法 io.netty.handler.codec.MessageToByteEncoder

        acceptOutboundMessage, allocateBuffer, isPreferDirect, write
      • 从类继承的方法 io.netty.channel.ChannelOutboundHandlerAdapter

        bind, close, connect, deregister, disconnect, flush, read
      • 从类继承的方法 io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved
      • 从接口继承的方法 io.netty.channel.ChannelHandler

        exceptionCaught, handlerAdded, handlerRemoved
    • 构造器详细资料

      • MsgEncoder

        public MsgEncoder()
    • 方法详细资料

      • isSharable

        public boolean isSharable()
        覆盖:
        isSharable 在类中 io.netty.channel.ChannelHandlerAdapter
      • encode

        protected void encode​(io.netty.channel.ChannelHandlerContext ctx,
                              Msg msg,
                              io.netty.buffer.ByteBuf out)
                       throws Exception
        指定者:
        encode 在类中 io.netty.handler.codec.MessageToByteEncoder<Msg>
        抛出:
        Exception