Class MessageToByteEncoder<I>

    • Constructor Detail

      • MessageToByteEncoder

        protected MessageToByteEncoder​(boolean preferDirect)
        Create a new instance which will try to detect the types to match out of the type parameter of the class.
        Parameters:
        preferDirect - true if a direct ByteBuf should be tried to be used as target for the encoded messages. If false is used it will allocate a heap ByteBuf, which is backed by an byte array.
      • MessageToByteEncoder

        protected MessageToByteEncoder​(java.lang.Class<? extends I> outboundMessageType,
                                       boolean preferDirect)
        Create a new instance
        Parameters:
        outboundMessageType - The type of messages to match
        preferDirect - true if a direct ByteBuf should be tried to be used as target for the encoded messages. If false is used it will allocate a heap ByteBuf, which is backed by an byte array.