Package net.devh.boot.grpc.common.codec
Enum Class CodecType
- All Implemented Interfaces:
Serializable,Comparable<CodecType>,Constable
The type of the codec.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe codec should be used for both compression and decompression.The codec should be used for compression only.The codec should be used for decompression only. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the associated codec should be used for compression.booleanWhether the associated codec should be used for decompression.static CodecTypeReturns the enum constant of this class with the specified name.static CodecType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
COMPRESS
The codec should be used for compression only. -
DECOMPRESS
The codec should be used for decompression only. -
ALL
The codec should be used for both compression and decompression.
-
-
Method Details
-
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
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 nameNullPointerException- 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.
-