public static enum CommonResponse.Error extends Enum<CommonResponse.Error> implements Error
| Enum Constant and Description |
|---|
CONNECTION
Connection error (the error code is -99).
|
DOWNLOAD_RESULT
Download result file error (the error code is -98).
|
HEALTHCHECK
Healthcheck return false (the error code is -1).
|
| Modifier and Type | Field and Description |
|---|---|
private static Map<Integer,CommonResponse.Error> |
BY_CODE
Defines a map of the
Error objects with the common error codes. |
private Integer |
code
Defines the error code.
|
private String |
description
Defines the error description.
|
| Modifier and Type | Method and Description |
|---|---|
static CommonResponse.Error |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CommonResponse.Error |
valueOfCode(Integer code)
Returns the enum constant of this type with the specified code.
|
static CommonResponse.Error[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfgetCode, getDescriptionpublic static final CommonResponse.Error HEALTHCHECK
public static final CommonResponse.Error DOWNLOAD_RESULT
public static final CommonResponse.Error CONNECTION
private final Integer code
private final String description
private static final Map<Integer,CommonResponse.Error> BY_CODE
Error objects with the common error codes.public static CommonResponse.Error[] values()
for (CommonResponse.Error c : CommonResponse.Error.values()) System.out.println(c);
public static CommonResponse.Error valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static CommonResponse.Error valueOfCode(Integer code)
code - The code of the enum constant to be returned.Copyright © 2023–2024. All rights reserved.