- java.lang.Object
-
- java.lang.Enum<BufferConversionHandler.Conversion>
-
- io.netty5.handler.adaptor.BufferConversionHandler.Conversion
-
- All Implemented Interfaces:
Serializable,Comparable<BufferConversionHandler.Conversion>
- Enclosing class:
- BufferConversionHandler
public static enum BufferConversionHandler.Conversion extends Enum<BufferConversionHandler.Conversion>
The particular conversion operation to apply. See the individual operations for their specific behaviour.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOTHConvert anyBuffers intoByteBufs, and anyByteBufs intoBuffers.BUFFER_TO_BYTEBUFConvertBufferinstances toByteBufinstances.BYTEBUF_TO_BUFFERConvertByteBufinstances toBufferinstances.NONEDo not convert anything, but let the messages pass through unchanged.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Objectconvert(Object msg)Apply this conversion to the given message, if applicable.abstract BufferConversionHandler.Conversioninvert()Return aBufferConversionHandler.Conversionthat is the inverse of this one.static BufferConversionHandler.ConversionvalueOf(String name)Returns the enum constant of this type with the specified name.static BufferConversionHandler.Conversion[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BYTEBUF_TO_BUFFER
public static final BufferConversionHandler.Conversion BYTEBUF_TO_BUFFER
ConvertByteBufinstances toBufferinstances.Messages that are either already of a
Buffertype, or of an unknown type, will pass through unchanged.
-
BUFFER_TO_BYTEBUF
public static final BufferConversionHandler.Conversion BUFFER_TO_BYTEBUF
ConvertBufferinstances toByteBufinstances.Messages that are either already of a
ByteBuftype, or of an unknown type, will pass through unchanged.
-
BOTH
public static final BufferConversionHandler.Conversion BOTH
Convert anyBuffers intoByteBufs, and anyByteBufs intoBuffers.Messages of unknown types are passed through unchanged.
-
NONE
public static final BufferConversionHandler.Conversion NONE
Do not convert anything, but let the messages pass 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 nameNullPointerException- 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.
-
invert
public abstract BufferConversionHandler.Conversion invert()
Return aBufferConversionHandler.Conversionthat is the inverse of this one.- Returns:
- A conversion that converts buffers in the opposite direction.
-
-