Enum Class ValidationResultType
java.lang.Object
java.lang.Enum<ValidationResultType>
dev.demeng.sentinel.client.license.validation.ValidationResultType
- All Implemented Interfaces:
Serializable,Comparable<ValidationResultType>,Constable
The type of a license validation result, indicating whether validation succeeded and, if not, the
specific reason for failure.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe license has been blacklisted.The connection value does not match the license's registered connection.The license has exceeded its maximum number of concurrent IP addresses.The license has exceeded its maximum number of concurrent servers.The license has expired.The license key is not recognized.Auto-creation was attempted but the request is missing a connection platform or value.The product validation failed.The license is valid.An unrecognized validation result type returned by the API. -
Method Summary
Modifier and TypeMethodDescriptionstatic ValidationResultTypefromString(@Nullable String value) Converts a string value to aValidationResultType, returningUNKNOWNif the value isnullor unrecognized.static ValidationResultTypeReturns the enum constant of this class with the specified name.static ValidationResultType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUCCESS
The license is valid. -
INVALID_PRODUCT
The product validation failed. CheckValidationResult.getMessage()to distinguish between: product not found, license belonging to a different product, or auto-creation not enabled for the product. -
INVALID_LICENSE
The license key is not recognized. -
INVALID_PLATFORM
Auto-creation was attempted but the request is missing a connection platform or value. -
EXPIRED_LICENSE
The license has expired. -
BLACKLISTED_LICENSE
The license has been blacklisted. -
CONNECTION_MISMATCH
The connection value does not match the license's registered connection. -
EXCESSIVE_SERVERS
The license has exceeded its maximum number of concurrent servers. -
EXCESSIVE_IPS
The license has exceeded its maximum number of concurrent IP addresses. -
UNKNOWN
An unrecognized validation result type returned by the API.
-
-
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
-
fromString
Converts a string value to aValidationResultType, returningUNKNOWNif the value isnullor unrecognized.- Parameters:
value- the string representation of the result type- Returns:
- the matching enum constant, or
UNKNOWN
-