public abstract class AbstractAPIRequest<T extends APIResponse> extends Object implements APIRequest<T>
| 限定符和类型 | 字段和说明 |
|---|---|
protected com.google.gson.Gson |
gson |
protected org.yelong.http.request.HttpRequest |
httpRequest |
static String |
SCHEMA_KEY |
static String |
X_AUTH_TOKEN
已过时。
|
COMMON_HEADER_PARAM_NAMES| 构造器和说明 |
|---|
AbstractAPIRequest(String apiMethodName,
String method) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
check()
验证请求
|
String |
getApiMethodName()
api 方法名称
|
String |
getAuthToken()
获取令牌
|
org.yelong.http.request.HttpRequest |
getHttpRequest()
获取 http 请求
|
String |
getSchemaTag()
获取 scheam
|
String |
getServerUrl()
获取服务的根url
|
Long |
getTimestamp()
获取时间戳
|
void |
setAuthToken(String authToken)
设置令牌
|
void |
setSchemaTag(String schemaTag)
设置 schema
|
void |
setServerUrl(String serverUrl)
设置服务的根url
|
void |
setTimestamp(long timestamp)
设置时间戳
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetResponseClass@Deprecated public static final String X_AUTH_TOKEN
protected final com.google.gson.Gson gson
protected org.yelong.http.request.HttpRequest httpRequest
public String getApiMethodName()
APIRequestgetApiMethodName 在接口中 APIRequest<T extends APIResponse>public String getServerUrl()
APIRequestgetServerUrl 在接口中 APIRequest<T extends APIResponse>public void setServerUrl(String serverUrl)
APIRequestsetServerUrl 在接口中 APIRequest<T extends APIResponse>public void setAuthToken(String authToken)
APIRequestsetAuthToken 在接口中 APIRequest<T extends APIResponse>public String getAuthToken()
APIRequestgetAuthToken 在接口中 APIRequest<T extends APIResponse>public void check()
throws APIRuleException
APIRequestcheck 在接口中 APIRequest<T extends APIResponse>APIRuleExceptionpublic org.yelong.http.request.HttpRequest getHttpRequest()
throws org.yelong.http.exception.HttpException,
APIException,
IOException
APIRequestgetHttpRequest 在接口中 APIRequest<T extends APIResponse>org.yelong.http.exception.HttpExceptionAPIExceptionIOExceptionpublic void setSchemaTag(String schemaTag)
APIRequestsetSchemaTag 在接口中 APIRequest<T extends APIResponse>public String getSchemaTag()
APIRequestgetSchemaTag 在接口中 APIRequest<T extends APIResponse>public Long getTimestamp()
APIRequestgetTimestamp 在接口中 APIRequest<T extends APIResponse>public void setTimestamp(long timestamp)
APIRequestsetTimestamp 在接口中 APIRequest<T extends APIResponse>Copyright © 2020. All rights reserved.