01: /* Extendlet.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Wed Jul 4 15:43:39 2007, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2007 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.web.util.resource;
20:
21: import java.io.IOException;
22:
23: import javax.servlet.ServletException;
24: import javax.servlet.http.HttpServletRequest;
25: import javax.servlet.http.HttpServletResponse;
26:
27: /**
28: * A plugin of {@link ClassWebResource} to process particular
29: * content.
30: *
31: * <p>To add a resource processor to {@link ClassWebResource}, use
32: * {@link ClassWebResource#addExtendlet}.
33: *
34: * @author tomyeh
35: * @since 2.4.1
36: * @see ClassWebResource#addExtendlet
37: */
38: public interface Extendlet {
39: /** Initializes the resouorce processor.
40: */
41: public void init(ExtendletConfig config);
42:
43: /** Process the specified request.
44: *
45: * @param path the path mapped to this resource processor.
46: * @param extra an additional string to output (to response.getWriter).
47: * Ignored if null.
48: */
49: public void service(HttpServletRequest request,
50: HttpServletResponse response, String path, String extra)
51: throws ServletException, IOException;
52: }
|