Enum Class CodecType

java.lang.Object
java.lang.Enum<CodecType>
net.devh.boot.grpc.common.codec.CodecType
All Implemented Interfaces:
Serializable, Comparable<CodecType>, Constable

public enum CodecType extends Enum<CodecType>
The type of the codec.
  • Enum Constant Details

    • COMPRESS

      public static final CodecType COMPRESS
      The codec should be used for compression only.
    • DECOMPRESS

      public static final CodecType DECOMPRESS
      The codec should be used for decompression only.
    • ALL

      public static final CodecType ALL
      The codec should be used for both compression and decompression.
  • Method Details

    • values

      public static CodecType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CodecType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • isForCompression

      public boolean isForCompression()
      Whether the associated codec should be used for compression.
      Returns:
      True, if the codec can be used for compression. False otherwise.
    • isForDecompression

      public boolean isForDecompression()
      Whether the associated codec should be used for decompression.
      Returns:
      True, if the codec can be used for decompression. False otherwise.