com.aliyuncs.v5.http.CallBack Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aliyun-java-sdk-core-v5 Show documentation
Show all versions of aliyun-java-sdk-core-v5 Show documentation
Aliyun Open API SDK for Java
Copyright (C) Alibaba Cloud Computing
All rights reserved.
版权所有 (C)阿里云计算有限公司
http://www.aliyun.com
The newest version!
package com.aliyuncs.v5.http;
/**
* 用于异步调用时的回调逻辑
*
* @author VK.Gao
* @date 2017/03/02
*/
public interface CallBack {
/**
* 请求失败
*
* @param request 封装后的请求对象,包含部分http相关信息
* @param e 导致失败的异常
*/
void onFailure(HttpRequest request, Exception e);
/**
* 收到应答
*
* @param request 封装后的请求对象,包含部分http相关信息
* @param response 封装后的应答对象,包含部分http相关信息,可以调用.getBody()获取content
*/
void onResponse(HttpRequest request, HttpResponse response);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy