接口 IKdListener<T>


  • public interface IKdListener<T>
    请求监听器 Created by ChenJun on 2021/9/15.
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      static java.lang.String TAG  
    • 字段详细资料

    • 方法详细资料

      • onSuccess

        default void onSuccess​(@Nullable
                               T result)
        请求成功
        参数:
        result - 成功的结果
      • onFailed

        default void onFailed​(int errorCode,
                              @Nullable
                              java.lang.String errorInfo)
        请求失败
        参数:
        errorCode - 错误码,参见KdErrorCode
        errorInfo - 对错误码进行解释
      • onTimeout

        default void onTimeout()
        请求超时
      • removeKdListener

        @MainThread
        static void removeKdListener​(@NonNull
                                     IKdListener<?> kdListener)
        移除请求监听接口(当中途需要取消请求时)