next up previous contents
Next: Filter Factory Up: Filter API Previous: Content Filter   Contents

Http Filter

The HttpFilter interface is designed to be used by filters that need to generate an HTTP reply for a request without having to send the request to a web server. This essentially allows the filter to simulate a web server. The interface is based on the HttpReply interface which is used by the system to communicate with web servers. Additionally, HttpFilter adds the wantRequest() method that is used to determine whether or not a filter is interested in handling a particular request. Figure 4.10 shows the Java code for the HttpFilter interface.

Figure 4.10: Http Filter
\begin{figure}
\begin{center}
\ssp
\begin{verbatim}public interface HttpRelay ...
...an wantRequest(Request request);
}\end{verbatim}\dsp
\end{center}\end{figure}



Mark R. Boyns
1999-01-12