|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mortbay.HTTP.Handler.NullHandler | +--com.mortbay.HTTP.Handler.FilterHandler
Filter HttpHandler
Filter handler can be used to insert filters into the outputStream of the response generated by subsequent handlers. It is intended to be allow modifications of responses such as:
If the path matches a request, new filter instances are added to the response. These will only be activated if their content types match that of the response (which may be set later). If the filter class has a constructor that take a HttpRequest then the request is passed, otherwise the default constructor is used.
Fields inherited from class com.mortbay.HTTP.Handler.NullHandler |
httpServer |
Constructor Summary | |
FilterHandler(PathMap filterMap)
Construct a FilterHandler |
|
FilterHandler(java.util.Properties properties)
Construct basic auth handler. |
Method Summary | |
void |
handle(HttpRequest request,
HttpResponse response)
Handle filters for requests. |
void |
setProperties(java.util.Properties properties)
Configure from Properties. |
Methods inherited from class com.mortbay.HTTP.Handler.NullHandler |
destroy,
getProperties,
servlet,
servletNames,
setServer,
translate |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public FilterHandler(java.util.Properties properties) throws java.io.IOException
properties
- Passed to setPropertiespublic FilterHandler(PathMap filterMap)
filterMap
- A PathMap mapping paths to be filtered to either
the class name of a HttpFilter or a Vector of class names.
If the a request path maps to 1 or more filters, these are added
to the HttpResponse in order.Method Detail |
public void setProperties(java.util.Properties properties) throws java.io.IOException
name.CLASS : filterClassName name.PATHS : /list/of/paths
properties
- Configuration.public void handle(HttpRequest request, HttpResponse response) throws java.lang.Exception
request
- The HTTP requests to be handledresponse
- The HTTP response to be used.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |