KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > excalibur > instrument > manager > http > server > HTTPURLHandler


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14  * implied.
15  *
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */

19
20 package org.apache.excalibur.instrument.manager.http.server;
21
22 import java.io.IOException JavaDoc;
23 import java.io.OutputStream JavaDoc;
24 import java.util.Map JavaDoc;
25
26
27 /**
28  *
29  * @author <a HREF="mailto:dev@avalon.apache.org">Avalon Development Team</a>
30  * @version CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:29 $
31  * @since 4.1
32  */

33 public interface HTTPURLHandler
34 {
35     String JavaDoc CONTENT_TYPE_TEXT_HTML = "text/html";
36     String JavaDoc CONTENT_TYPE_TEXT_XML = "text/xml";
37     String JavaDoc CONTENT_TYPE_IMAGE_JPEG = "image/jpeg";
38     String JavaDoc CONTENT_TYPE_IMAGE_X_ICON = "image/x-icon";
39     
40     /**
41      * Returns the path handled by this handler.
42      *
43      * @return The path handled by this handler.
44      */

45     String JavaDoc getPath();
46     
47     /**
48      * Returns the content type.
49      *
50      * @return The content type.
51      */

52     String JavaDoc getContentType();
53     
54     /**
55      * Return the encoding to use.
56      *
57      * @return the encoding.
58      */

59     String JavaDoc getEncoding();
60     
61     /**
62      * Handles the specified request.
63      *
64      * @param The full path being handled.
65      * @param parameters A Map of the parameters in the request.
66      * @param os The OutputStream to write the result to.
67      */

68     void handleRequest( String JavaDoc path, Map JavaDoc parameters, OutputStream JavaDoc os )
69         throws IOException JavaDoc;
70 }
71
72
Popular Tags