org.apache.storm.messaging.netty

## Class NettySerializableMessageEncoder

- java.lang.Object
- - org.apache.storm.shade.io.netty.channel.ChannelHandlerAdapter
  - - org.apache.storm.shade.io.netty.channel.ChannelOutboundHandlerAdapter
    - - org.apache.storm.shade.io.netty.handler.codec.MessageToByteEncoder<INettySerializable>
      - - org.apache.storm.messaging.netty.NettySerializableMessageEncoder

- All Implemented Interfaces:
    org.apache.storm.shade.io.netty.channel.ChannelHandler, org.apache.storm.shade.io.netty.channel.ChannelOutboundHandler

      @ChannelHandler.Sharable
      public class NettySerializableMessageEncoder
      extends org.apache.storm.shade.io.netty.handler.codec.MessageToByteEncoder<INettySerializable>

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.storm.shade.io.netty.channel.ChannelHandler

      `org.apache.storm.shade.io.netty.channel.ChannelHandler.Sharable`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static NettySerializableMessageEncoder` | `INSTANCE`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected org.apache.storm.shade.io.netty.buffer.ByteBuf` | `allocateBuffer(org.apache.storm.shade.io.netty.channel.ChannelHandlerContext ctx, INettySerializable msg, boolean preferDirect)`
    `protected void` | `encode(org.apache.storm.shade.io.netty.channel.ChannelHandlerContext ctx, INettySerializable msg, org.apache.storm.shade.io.netty.buffer.ByteBuf out)`

    - ### Methods inherited from class org.apache.storm.shade.io.netty.handler.codec.MessageToByteEncoder

      `acceptOutboundMessage, isPreferDirect, write`

    - ### Methods inherited from class org.apache.storm.shade.io.netty.channel.ChannelOutboundHandlerAdapter

      `bind, close, connect, deregister, disconnect, flush, read`

    - ### Methods inherited from class org.apache.storm.shade.io.netty.channel.ChannelHandlerAdapter

      `ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharable`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.storm.shade.io.netty.channel.ChannelHandler

      `exceptionCaught, handlerAdded, handlerRemoved`

- - ### Field Detail

    - #### INSTANCE

          public static final NettySerializableMessageEncoder INSTANCE

  - ### Method Detail

    - #### encode

          protected void encode(org.apache.storm.shade.io.netty.channel.ChannelHandlerContext ctx,
                                INettySerializable msg,
                                org.apache.storm.shade.io.netty.buffer.ByteBuf out)
                         throws Exception

      Specified by:
        `encode` in class `org.apache.storm.shade.io.netty.handler.codec.MessageToByteEncoder<INettySerializable>`
      Throws:
        `Exception`

    - #### allocateBuffer

          protected org.apache.storm.shade.io.netty.buffer.ByteBuf allocateBuffer(org.apache.storm.shade.io.netty.channel.ChannelHandlerContext ctx,
                                                                                  INettySerializable msg,
                                                                                  boolean preferDirect)
                                                                           throws Exception

      Overrides:
        `allocateBuffer` in class `org.apache.storm.shade.io.netty.handler.codec.MessageToByteEncoder<INettySerializable>`
      Throws:
        `Exception`

Copyright © 2021 The Apache Software Foundation. All rights reserved.