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

com.jd.httpservice.ResponseConverter Maven / Gradle / Ivy

There is a newer version: 2.1.4.RELEASE
Show newest version
package com.jd.httpservice;

import java.io.InputStream;

import com.jd.httpservice.agent.ServiceRequest;

/**
 * 回复结果转换器;
 * 
 * 用于定义如何从 http 回复的文本结果转换为一个特定的对象;
 * 
 * 当 ResponseConvert 抛出的异常的类型存在于服务接口的操作方法声明 的异常列表中,则异常将被直接返回给调用者;
 * 
 * @author haiq
 *
 */
public interface ResponseConverter {
	
	// TODO 支持按 HTTP 状态进行解析;
	public Object getResponse(ServiceRequest request, InputStream responseStream, HttpServiceContext serviceContext) throws Exception;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy