Package org.moera.lib.naming
Enum Class NamingError
- All Implemented Interfaces:
Serializable
,Comparable<NamingError>
,Constable
The
NamingError
enum represents a collection of error codes related to Moera Naming API operations.
Each error includes a unique RPC code, an error code string, and a descriptive message to provide
details about the nature of the error.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents an exception related to cryptographic configurations or operations.Represents an error where a specified service endpoint is incorrect or unreachable.Represents an error indicating that the generation provided in the operation does not match the current generation.Represents an error indicating that the specified generation of a name is reserved and cannot be used for registrations.Represents an error indicating that the provided name is empty.Represents a rule violation where a name contains forbidden characters.Represents an error where the provided name exceeds the allowed length.Represents an error indicating that the length of the provided node URI exceeds the allowed maximum limit.Represents an error where the specified page number in a paginated query is incorrect.Represents an error indicating that the provided page size is incorrect.Represents an error indicating that the requested page size exceeds the allowed limit.Indicates that the previous digest provided in the request does not match the current digest associated with the entity.Represents an error indicating that the providedpreviousDigest
has an incorrect length.Represents an error indicating failed signature verification.Represents an error indicating that the provided signature exceeds the maximum allowable length.Represents an error indicating that the provided signing key has an incorrect length.Represents an error indicating that theupdatingKey
parameter is empty ornull
when it is required for a specific operation.Represents an error indicating that the provided updating key has an incorrect length.Represents a validation error indicating that thevalidFrom
timestamp precedes the creation of a name in the naming service.Represents a validation error indicating that thevalidFrom
field is empty.Represents an error indicating that thevalidFrom
timestamp is considered too far in the past. -
Method Summary
Modifier and TypeMethodDescriptionstatic NamingError
Retrieves aNamingError
based on the provided error code.Retrieves the error code associated with the error.Retrieves the message associated with the error.int
Retrieves the RPC code.static NamingError
Returns the enum constant of this class with the specified name.static NamingError[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NAME_EMPTY
Represents an error indicating that the provided name is empty. -
NAME_TOO_LONG
Represents an error where the provided name exceeds the allowed length. -
NAME_FORBIDDEN_CHARS
Represents a rule violation where a name contains forbidden characters. -
NODE_URI_TOO_LONG
Represents an error indicating that the length of the provided node URI exceeds the allowed maximum limit. -
UPDATING_KEY_EMPTY
Represents an error indicating that theupdatingKey
parameter is empty ornull
when it is required for a specific operation. -
UPDATING_KEY_WRONG_LENGTH
Represents an error indicating that the provided updating key has an incorrect length. -
SIGNING_KEY_WRONG_LENGTH
Represents an error indicating that the provided signing key has an incorrect length. -
VALID_FROM_EMPTY
Represents a validation error indicating that thevalidFrom
field is empty. -
VALID_FROM_BEFORE_CREATED
Represents a validation error indicating that thevalidFrom
timestamp precedes the creation of a name in the naming service. -
VALID_FROM_TOO_FAR_IN_PAST
Represents an error indicating that thevalidFrom
timestamp is considered too far in the past. The maximum allowed distance in the past is defined inRules.VALID_FROM_IN_PAST
-
SIGNATURE_TOO_LONG
Represents an error indicating that the provided signature exceeds the maximum allowable length. -
SIGNATURE_INVALID
Represents an error indicating failed signature verification. -
CRYPTO_EXCEPTION
Represents an exception related to cryptographic configurations or operations. -
PREVIOUS_DIGEST_WRONG_LENGTH
Represents an error indicating that the providedpreviousDigest
has an incorrect length. -
PREVIOUS_DIGEST_INCORRECT
Indicates that the previous digest provided in the request does not match the current digest associated with the entity. This status may be returned when a modification to the entity has occurred since the initial data was retrieved, potentially indicating a conflict or concurrent modification. -
GENERATION_NOT_SAME
Represents an error indicating that the generation provided in the operation does not match the current generation. -
PAGE_INCORRECT
Represents an error where the specified page number in a paginated query is incorrect. -
PAGE_SIZE_INCORRECT
Represents an error indicating that the provided page size is incorrect. -
PAGE_SIZE_TOO_LARGE
Represents an error indicating that the requested page size exceeds the allowed limit. -
ENDPOINT_WRONG
Represents an error where a specified service endpoint is incorrect or unreachable. -
GENERATION_RESERVED
Represents an error indicating that the specified generation of a name is reserved and cannot be used for registrations.
-
-
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
-
getRpcCode
public int getRpcCode()Retrieves the RPC code.- Returns:
- the integer value representing the RPC code
-
getErrorCode
Retrieves the error code associated with the error.- Returns:
- a string representing the error code
-
getMessage
Retrieves the message associated with the error.- Returns:
- the message as a string
-
forCode
Retrieves aNamingError
based on the provided error code.- Parameters:
code
- the error code for which the correspondingNamingError
is to be retrieved- Returns:
- the
NamingError
that matches the provided error code, ornull
if no match is found or the input isnull
.
-