public interface RestfulService
| 限定符和类型 | 方法和说明 |
|---|---|
void |
precheck(RestfulRequest request,
RestfulResponse response)
(可选的)预检查请求是否可以进行
|
void |
service(RestfulRequest request,
RestfulResponse response)
处理请求
|
void |
timeout(RestfulRequest request,
RestfulResponse response)
处理请求超时未响应,可以响应业务层的超时,若不处理会响应HTTP 202
|
void precheck(RestfulRequest request, RestfulResponse response) throws IOException
request - 请求response - 响应IOException - 若抛出则会直接关闭连接(且尽量响应500)void service(RestfulRequest request, RestfulResponse response) throws IOException
request - 请求response - 响应IOException - 若抛出则会直接关闭连接(且尽量响应500)void timeout(RestfulRequest request, RestfulResponse response) throws IOException
request - 请求response - 响应IOException - IO异常时抛出Copyright © 2021. All rights reserved.