Enum ResultCode
- java.lang.Object
-
- java.lang.Enum<ResultCode>
-
- br.com.anteros.mqtt.core.server.http.api.code.ResultCode
-
- All Implemented Interfaces:
Serializable,Comparable<ResultCode>
public enum ResultCode extends Enum<ResultCode>
响应 code 码- Author:
- L.cm
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetResultCode()org.tio.http.common.HttpResponseStatusgetStatusCode()static ResultCodevalueOf(String name)Returns the enum constant of this type with the specified name.static ResultCode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SUCCESS
public static final ResultCode SUCCESS
成功
-
E101
public static final ResultCode E101
关键请求参数缺失
-
E102
public static final ResultCode E102
请求参数错误
-
E103
public static final ResultCode E103
用户名或密码错误
-
E104
public static final ResultCode E104
请求方法错误
-
E105
public static final ResultCode E105
未知错误
-
-
Method Detail
-
values
public static ResultCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ResultCode c : ResultCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ResultCode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getStatusCode
public org.tio.http.common.HttpResponseStatus getStatusCode()
-
getResultCode
public int getResultCode()
-
-