KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > main > I_CmsRequestHandler


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src/org/opencms/main/I_CmsRequestHandler.java,v $
3  * Date : $Date: 2005/06/23 11:11:38 $
4  * Version: $Revision: 1.8 $
5  *
6  * This library is part of OpenCms -
7  * the Open Source Content Mananagement System
8  *
9  * Copyright (c) 2005 Alkacon Software GmbH (http://www.alkacon.com)
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * For further information about Alkacon Software GmbH, please see the
22  * company website: http://www.alkacon.com
23  *
24  * For further information about OpenCms, please see the
25  * project website: http://www.opencms.org
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */

31
32 package org.opencms.main;
33
34 import java.io.IOException JavaDoc;
35
36 import javax.servlet.ServletException JavaDoc;
37 import javax.servlet.http.HttpServletRequest JavaDoc;
38 import javax.servlet.http.HttpServletResponse JavaDoc;
39
40 /**
41  * Describes an OpenCms request handler.<p>
42  *
43  * Request handlers are used for special requests to OpenCms
44  * that should NOT be mapped to a VFS resource.
45  * A request handler URI always start with <code>/handle</code> and then
46  * one or more possible handler names as defined with the {@link #getHandlerNames()}
47  * method.<p>
48  *
49  * For example, if a registerd request handler has the name <code>"MyName"</code>,
50  * any request (in a simple setup) to <code>/opencms/opencms/handlerMyName...</code> will directly be transfered
51  * to the {@link #handle(HttpServletRequest, HttpServletResponse, String)} method of this
52  * handler.<p>
53  *
54  * In essence, the request handlers are like simplified mini-servlets that run inside OpenCms.
55  * Of course they are not intended as replacements for real servlets.
56  * In case you require sophisticated lifecycle support use a genuine servlet instead.<p>
57  *
58  * @author Alexander Kandzior
59  *
60  * @version $Revision: 1.8 $
61  *
62  * @since 6.0.0
63  */

64 public interface I_CmsRequestHandler {
65
66     /**
67      * Returns the handler name.<p>
68      *
69      * @return the handler name
70      */

71     String JavaDoc[] getHandlerNames();
72
73     /**
74      * Handles an OpenCms request.<p>
75      *
76      * @param req the current request
77      * @param res the current response
78      * @param name the handler name to invoke
79      * @throws ServletException in case an error occurs
80      * @throws IOException in case an error occurs
81      */

82     void handle(HttpServletRequest JavaDoc req, HttpServletResponse JavaDoc res, String JavaDoc name) throws IOException JavaDoc, ServletException JavaDoc;
83 }
84
Popular Tags