On Tue, 13 Apr 2021 15:39:17 GMT, Julia Boes <[email protected]> wrote:
> Add two static factory methods to com.sun.net.httpserver.Filter that
> facilitate the creation of pre- and post-processing Filters:
>
> `public static Filter beforeResponse(String description,
> Consumer<HttpExchange> filterImpl) {}`
> `public static Filter afterResponse(String description,
> Consumer<HttpExchange> filterImpl) {}`
Updated the method names and specifications, which now include @apiNotes and
examples. I'm not sure if we want to keep both examples for `afterHandler`?
Added a test for the uncommon case where the filters handle the exchange (not
the handler).
-------------
PR: https://git.openjdk.java.net/jdk/pull/3468