Zhiqim Httpd即知启蒙WEB容器,是Zhiqim Framework面向WEB开发的多例服务,提供更简洁配置、积木式组件模块和天然的模型模板设计。
HttpEntity.java1KB
/*
* 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[遇见知启蒙,邂逅框架梦]
*
* https://zhiqim.org/project/zhiqim_framework/zhiqim_httpd.htm
*
* Zhiqim Httpd is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
package org.zhiqim.httpd;
import java.io.IOException;
/**
* 对应HTTP一个处理的实体,和HttpHandler不同的是:
* 1.只需消息头内容
* 2.对应实际的一个文件或处理,无其他业务逻辑
* 3.处理完成后即发送
*
* 用于静态文件等,无需创建复杂的HttpRequest和HttpResponse
*
* @see HttpExecutor 业务处理器
* @version v1.0.0 @author zouzhigang 2016-7-19 新建与整理
*/
public interface HttpEntity extends HttpHandler
{
/**
* 处理HTTP请求, 来自GET,POST方法
*
* @param header 请求头
* @param sender 响应发送者
* @throws IOException 异常
*/
public void handle(HttpHeader header, HttpSender sender) throws IOException;
}