@Exported public abstract class Filter extends Object
Each Filter in the chain, invokes the next filter within its own doFilter() implementation. The final Filter in the chain invokes the applications exchange handler.
Modifier and Type | Class and Description |
---|---|
static class |
Filter.Chain
a chain of filters associated with a HttpServer.
|
Modifier | Constructor and Description |
---|---|
protected |
Filter() |
Modifier and Type | Method and Description |
---|---|
abstract String |
description()
returns a short description of this Filter
|
abstract void |
doFilter(HttpExchange exchange,
Filter.Chain chain)
Asks this filter to pre/post-process the given exchange.
|
public abstract void doFilter(HttpExchange exchange, Filter.Chain chain) throws IOException
HttpExchange.setStreams(InputStream,OutputStream)
Filter.Chain.doFilter(HttpExchange)
Filter.Chain.doFilter(HttpExchange)
exchange
- the HttpExchange
to be filtered.chain
- the Chain which allows the next filter to be invoked.IOException
- may be thrown by any filter module, and if
caught, must be rethrown again.NullPointerException
- if either exchange or chain are null
public abstract String description()
Copyright © 2005, 2015, Oracle and/or its affiliates. All rights reserved.