All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pdd.pop.sdk.http.PopClient Maven / Gradle / Ivy

There is a newer version: 1.10.85
Show newest version
package com.pdd.pop.sdk.http;

import java.util.concurrent.Future;

/**
 * @author xuanli
 * @Description: TODO
 * @date 2018/12/4 16:40
 */
public interface PopClient {
    
    /**
     * 同步执行请求
     * @param request : 请求参数
     * @param   响应类
     * @return   继承于 PopBaseHttpResponse的响应
     * @throws Exception
     */
     T syncInvoke(PopBaseHttpRequest request) throws Exception;
    
    /**
     * 同步执行请求
     * @param request : 请求参数
     * @param accessToken : 鉴权token
     * @param   响应类
     * @return   继承于 PopBaseHttpResponse的响应
     * @throws Exception
     */
     T syncInvoke(PopBaseHttpRequest request,String accessToken) throws Exception;
    
    /**
     * 异步执行请求
     * @param request : 请求参数
     * @param 响应类
     * @return   Future的响应
     * @throws Exception
     */
     Future asyncInvoke(final PopBaseHttpRequest request) throws Exception;
    
    /**
     * 异步执行请求
     * @param request : 请求参数
     * @param accessToken : 鉴权token
     * @param   响应类
     * @return Future的响应
     * @throws Exception
     */
     Future asyncInvoke(final PopBaseHttpRequest request,String accessToken) throws Exception;
    
    
    /**
     * 销毁实例
     */
    void destroy();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy