01: // RequestProcessor.java
02: // $Id: RequestProcessor.java,v 1.2 1998/01/22 14:36:18 bmahe Exp $
03: // (c) COPYRIGHT MIT and INRIA, 1996.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05:
06: package org.w3c.www.protocol.http;
07:
08: /**
09: * Request processor interface.
10: * Request processors are object whose invocation is done prior to any request
11: * launching, and who have the opportunity to answer to the request before it
12: * actually goes out to the target server.
13: * <p>Typicall request processors will probably be local cache manager, or
14: * distributed cache managers, or any other kind of caches. They can also
15: * be used to limit what requests are allowed to go out, and other nifty
16: * things you can imagine.
17: */
18:
19: public interface RequestProcessor {
20:
21: /**
22: * Can this processor handle this request ?
23: * Given the actual request, the processor is called to see if it can
24: * actually answer it. It this is the case, the processor should return
25: * a valid IngoingReply to be forwarded back to the application.
26: * @param request The request to be handled.
27: * @return An instance of Reply, or <strong>null</strong> if the
28: * processor was unable to answer the request.
29: * @exception HttpException If the processor decies that this request
30: * is erroneous, and shouldn't proceed further.
31: */
32:
33: public Reply processRequest(Request request) throws HttpException;
34:
35: }
|