com.kingsoft.services.http.IKWSHttpClient Maven / Gradle / Ivy
package com.kingsoft.services.http;
import com.kingsoft.services.RequestMessage;
import com.kingsoft.services.ResponseMessage;
import com.kingsoft.services.exception.KWSClientException;
import com.kingsoft.services.exception.KWSServiceException;
import com.kingsoft.services.handlers.HttpResponseHandler;
public interface IKWSHttpClient {
/**
* 执行请求:如果执行失败,则抛出异常;如果执行成功,则返回结果
*
* @param requestMsg
* 请求消息
* @param responseHandler
* 响应处理handler
* @param errorResponseHandler
* 错误处理handler
* @return
* @throws KWSServiceException
* @throws KWSClientException
*/
ResponseMessage execute(RequestMessage> requestMsg,
HttpResponseHandler responseHandler,
HttpResponseHandler errorResponseHandler)
throws KWSServiceException, KWSClientException;
/**
* 关闭http client对象,释放资源,关闭之后,当前http client对象不能再使用
*/
void shutdown();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy