NIMSDK-AOS  10.5.0
RequestResult.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.util.api;
2 
6 public class RequestResult<T> {
7  public int code;
8  public Throwable exception;
9  public T data;
10 
11  public RequestResult(int code, T data, Throwable exception) {
12  this.code = code;
13  this.data = data;
14  this.exception = exception;
15  }
16 
17  public RequestResult(int errorCode) {
18  this.code = errorCode;
19  }
20 
21  @Override
22  public String toString() {
23  return "RequestResult{" +
24  "code=" + code +
25  ", exception=" + exception +
26  ", data=" + data +
27  '}';
28  }
29 }
RequestResult(int code, T data, Throwable exception)
云信API异步转同步调用结果