com.jchanghong.http.server.action.Action Maven / Gradle / Ivy
The newest version!
package com.jchanghong.http.server.action;
import com.jchanghong.http.server.HttpServerRequest;
import com.jchanghong.http.server.HttpServerResponse;
import java.io.IOException;
/**
* 请求处理接口
* 当用户请求某个Path,则调用相应Action的doAction方法
*
* @author Looly
* @since 5.2.6
*/
@FunctionalInterface
public interface Action {
/**
* 处理请求
*
* @param request 请求对象
* @param response 响应对象
* @throws IOException IO异常
*/
void doAction(HttpServerRequest request, HttpServerResponse response) throws IOException;
}