XClient.java
1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.xiniunet.open.api.client;
import com.xiniunet.open.api.client.contract.SessionEnum;
/**
*/
public interface XClient {
/**
* 执行API公开的请求
*
* @param request 请求对象
* @param <T> 请求泛型
* @return 响应对象
* @throws ApiException 调用过程中出现的API异常
*/
<T extends XResponse> T execute(XRequest<T> request) throws ApiException;
/**
* 执行API隐私的请求
*
* @param request 请求对象
* @param session 会话参数
* @param <T> 请求泛型
* @return 响应对象
* @throws ApiException 调用过程中出现的API异常
*/
@Deprecated
<T extends XResponse> T execute(XRequest<T> request, String session) throws ApiException;
/**
* 执行API隐私的请求
*
* @param request 请求对象
* @param type 会话参数
* @param sessionId 会话参数
* @param <T> 请求泛型
* @return 响应对象
* @throws ApiException 调用过程中出现的API异常
*/
<T extends XResponse> T execute(XRequest<T> request, SessionEnum type, String sessionId) throws ApiException;
}