Enum Class TimiCode

java.lang.Object
java.lang.Enum<TimiCode>
com.imyeyu.java.bean.timi.TimiCode
All Implemented Interfaces:
Serializable, Comparable<TimiCode>, Constable

public enum TimiCode extends Enum<TimiCode>
通用代码(基于 HTTP 代码扩展)
Since:
2021-05-21 14:32
Author:
夜雨
  • Enum Constant Details

    • SUCCESS

      public static final TimiCode SUCCESS
      执行成功
    • IGNORE

      public static final TimiCode IGNORE
      执行成功,忽略请求
    • ARG_MISS

      public static final TimiCode ARG_MISS
      缺少参数
    • ARG_BAD

      public static final TimiCode ARG_BAD
      不合法的参数
    • ARG_EXPIRED

      public static final TimiCode ARG_EXPIRED
      过期的参数
    • PERMISSION_MISS

      public static final TimiCode PERMISSION_MISS
      无权限
    • PERMISSION_ERROR

      public static final TimiCode PERMISSION_ERROR
      无权限
    • REQUEST_BAD

      public static final TimiCode REQUEST_BAD
      非法请求
    • DATA_EXIST

      public static final TimiCode DATA_EXIST
      数据已存在
    • RESULT_NULL

      public static final TimiCode RESULT_NULL
      无数据
    • RESULT_BAD

      public static final TimiCode RESULT_BAD
      返回数据异常
    • RESULT_BAN

      public static final TimiCode RESULT_BAN
      禁用的数据
    • RESULT_TIMEOUT

      public static final TimiCode RESULT_TIMEOUT
      上游服务器连接超时
    • ERROR

      public static final TimiCode ERROR
      服务异常
    • ERROR_NOT_SUPPORT

      public static final TimiCode ERROR_NOT_SUPPORT
      服务异常
    • ERROR_NPE_VARIABLE

      public static final TimiCode ERROR_NPE_VARIABLE
      服务异常
    • ERROR_SERVICE_OFF

      public static final TimiCode ERROR_SERVICE_OFF
      服务关闭
    • ERROR_SERVICE_BUSY

      public static final TimiCode ERROR_SERVICE_BUSY
      服务繁忙
  • Method Details

    • values

      public static TimiCode[] 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

      public static TimiCode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • toException

      public TimiException toException()
      转为通用异常
      Returns:
      异常
    • toException

      public TimiException toException(String msg)
      转为通用异常
      Parameters:
      msg - 异常消息
      Returns:
      异常
    • toResponse

      public TimiResponse<?> toResponse()
      转为通用返回对象
      Returns:
      返回对象
    • fromCode

      public static TimiCode fromCode(int code)
      根据代码返回对象
      Parameters:
      code - 代码
      Returns:
      对象
    • getValue

      public Integer getValue()
      代码