Enum BufferConversionHandler.Conversion

    • Enum Constant Detail

      • BYTEBUF_TO_BUFFER

        public static final BufferConversionHandler.Conversion BYTEBUF_TO_BUFFER
        Convert ByteBuf instances to Buffer instances.

        Messages that are either already of a Buffer type, or of an unknown type, will pass through unchanged.

      • BUFFER_TO_BYTEBUF

        public static final BufferConversionHandler.Conversion BUFFER_TO_BYTEBUF
        Convert Buffer instances to ByteBuf instances.

        Messages that are either already of a ByteBuf type, or of an unknown type, will pass through unchanged.

      • BOTH

        public static final BufferConversionHandler.Conversion BOTH
        Convert any Buffers into ByteBufs, and any ByteBufs into Buffers.

        Messages of unknown types are passed through unchanged.

    • Method Detail

      • values

        public static BufferConversionHandler.Conversion[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (BufferConversionHandler.Conversion c : BufferConversionHandler.Conversion.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static BufferConversionHandler.Conversion valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • convert

        public abstract Object convert​(Object msg)
        Apply this conversion to the given message, if applicable.
        Parameters:
        msg - The message to maybe be converted.
        Returns:
        The result of the conversion.