public abstract class ExceptionFilter extends Object implements HttpFilter
Constructor and Description |
---|
ExceptionFilter() |
Modifier and Type | Method and Description |
---|---|
abstract void |
afterException(HttpServerRequest req,
HttpServerResponse res,
Throwable e)
异常之后的处理逻辑
|
void |
doFilter(HttpServerRequest req,
HttpServerResponse res,
com.sun.net.httpserver.Filter.Chain chain)
执行过滤
|
public void doFilter(HttpServerRequest req, HttpServerResponse res, com.sun.net.httpserver.Filter.Chain chain)
HttpFilter
doFilter
in interface HttpFilter
req
- HttpServerRequest
请求对象,用于获取请求内容res
- HttpServerResponse
响应对象,用于写出内容chain
- Filter.Chain
public abstract void afterException(HttpServerRequest req, HttpServerResponse res, Throwable e)
req
- HttpServerRequest
res
- HttpServerResponse
e
- 异常Copyright © 2024. All rights reserved.