io.netty.handler.codec.redis

## Enum RedisMessageType

- java.lang.Object
- - java.lang.Enum<RedisMessageType>
  - - io.netty.handler.codec.redis.RedisMessageType

All Implemented Interfaces:
  Serializable, Comparable<RedisMessageType>

    @UnstableApi
    public enum RedisMessageType
    extends Enum<RedisMessageType>

Type of RESP (REdis Serialization Protocol).

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`ARRAY_HEADER`
`BULK_STRING`
`ERROR`
`INLINE_COMMAND`
`INTEGER`
`SIMPLE_STRING`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`boolean` `isInline()` Returns `true` if this type is inline type, or returns `false`.
`int` `length()` Returns length of this type.
`static RedisMessageType` `readFrom(io.netty.buffer.ByteBuf in, boolean decodeInlineCommands)` Determine `RedisMessageType` based on the type prefix `byte` read from given the buffer.
`static RedisMessageType` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static RedisMessageType[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.
`void` `writeTo(io.netty.buffer.ByteBuf out)` Write the message type's prefix to the given buffer.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### INLINE_COMMAND

    public static final RedisMessageType INLINE_COMMAND

#### SIMPLE_STRING

    public static final RedisMessageType SIMPLE_STRING

#### ERROR

    public static final RedisMessageType ERROR

#### INTEGER

    public static final RedisMessageType INTEGER

#### BULK_STRING

    public static final RedisMessageType BULK_STRING

#### ARRAY_HEADER

    public static final RedisMessageType ARRAY_HEADER

### Method Detail

#### values

    public static RedisMessageType[] 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 (RedisMessageType c : RedisMessageType.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static RedisMessageType 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

#### length

    public int length()

Returns length of this type.

#### isInline

    public boolean isInline()

Returns `true` if this type is inline type, or returns `false`. If this is `true`, this type doesn't have length field.

#### readFrom

    public static RedisMessageType readFrom(io.netty.buffer.ByteBuf in,
                                            boolean decodeInlineCommands)

Determine `RedisMessageType` based on the type prefix `byte` read from given the buffer.

#### writeTo

    public void writeTo(io.netty.buffer.ByteBuf out)

Write the message type's prefix to the given buffer.