KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opensubsystems > core > www > WebCommonConstants


1 /*
2  * Copyright (c) 2003 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
3  *
4  * Project: OpenSubsystems
5  *
6  * $Id: WebCommonConstants.java,v 1.7 2007/02/20 04:10:16 bastafidli Exp $
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; version 2 of the License.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  */

21
22 package org.opensubsystems.core.www;
23
24 /**
25  * Definition of common constants for WWW used throughout the application.
26  *
27  * @version $Id: WebCommonConstants.java,v 1.7 2007/02/20 04:10:16 bastafidli Exp $
28  * @author Miro Halas
29  * @code.reviewer Miro Halas
30  * @code.reviewed 1.4 2006/04/26 02:06:38 jlegeny
31  */

32 public interface WebCommonConstants
33 {
34    /**
35     * Default HTTP port.
36     */

37    int HTTP_PORT_DEFAULT = 80;
38    
39    /**
40     * Default HTTPS port.
41     */

42    int HTTP_SECURE_PORT_DEFAULT = 443;
43
44    /**
45     * Standard backup (2nd instance) HTTP port.
46     */

47    int HTTP_PORT_BACKUP = 8080;
48
49    /**
50     * Backup (2nd instance) HTTPS port.
51     */

52    int HTTP_SECURE_PORT_BACKUP = 8443;
53
54    /**
55     * Minimal HTTP port.
56     * Zero actually means that random port will be chosen.
57     * @see java.net.InetSocketAddress
58     */

59    int HTTP_PORT_MIN = 0;
60    
61    /**
62     * Minimal HTTPS port.
63     * Zero actually means that random port will be chosen.
64     * @see java.net.InetSocketAddress
65     */

66    int HTTP_SECURE_PORT_MIN = 0;
67
68    /**
69     * Maximal HTTP port.
70     * @see java.net.InetSocketAddress
71     */

72    int HTTP_PORT_MAX = 65535;
73
74    /**
75     * Maximal HTTPS port.
76     * @see java.net.InetSocketAddress
77     */

78    int HTTP_SECURE_PORT_MAX = 65535;
79
80    /**
81     * String defining a http protocol
82     */

83    String JavaDoc PROTOCOL_HTTP = "http";
84    
85    /**
86     * String defining a https protocol
87     */

88    String JavaDoc PROTOCOL_HTTPS = "https";
89
90    /**
91     * String used as a root URL
92     */

93    String JavaDoc URL_ROOT = "/";
94
95    /**
96     * String used to separate different portions of URLs
97     *
98     * @see #URL_SEPARATOR_CHAR
99     */

100    String JavaDoc URL_SEPARATOR = "/";
101
102    /**
103     * Character used to separate different portions of URLs
104     *
105     * @see #URL_SEPARATOR
106     */

107    char URL_SEPARATOR_CHAR = '/';
108
109    /**
110     * String used to separate extension in URLs
111     *
112     * @see #EXTENSION_SEPARATOR_CHAR
113     */

114    String JavaDoc EXTENSION_SEPARATOR = ".";
115
116    /**
117     * Character used to separate extension in URLs
118     *
119     * @see #EXTENSION_SEPARATOR
120     */

121    char EXTENSION_SEPARATOR_CHAR = '.';
122
123    /**
124     * String used to separate parameters from the rest of the url
125     *
126     * @see #URL_PARAMETER_SEPARATOR_CHAR
127     */

128    String JavaDoc URL_PARAMETER_SEPARATOR = "?";
129
130    /**
131     * Character used to separate parameters from the rest of the url
132     *
133     * @see #URL_PARAMETER_SEPARATOR
134     */

135    char URL_PARAMETER_SEPARATOR_CHAR = '?';
136
137    /**
138     * String used to separate parameter name from value.
139     *
140     * @see #URL_PARAMETER_VALUE_SEPARATOR_CHAR
141     */

142    String JavaDoc URL_PARAMETER_VALUE_SEPARATOR = "=";
143
144    /**
145     * Character used to separate parameter name from value.
146     *
147     * @see #URL_PARAMETER_VALUE_SEPARATOR
148     */

149    char URL_PARAMETER_VALUE_SEPARATOR_CHAR = '=';
150
151    /**
152     * String used to separate parameters from each other.
153     *
154     * @see #URL_PARAMETER_PARAMETER_SEPARATOR_CHAR
155     */

156    String JavaDoc URL_PARAMETER_PARAMETER_SEPARATOR = "&";
157
158    /**
159     * Character used to separate parameters from each other.
160     *
161     * @see #URL_PARAMETER_PARAMETER_SEPARATOR
162     */

163    char URL_PARAMETER_PARAMETER_SEPARATOR_CHAR = '&';
164
165    /**
166     * Valid extension for web images. ALways should be compared with lower case strings.
167     *
168     * @see #WEB_IMAGE_EXTENSION_LENGTH
169     */

170    String JavaDoc JPEG_IMAGE_EXTENSION = ".jpg";
171
172    /**
173     * Length of JPEG_IMAGE_EXTENSION.
174     *
175     * @see #JPEG_IMAGE_EXTENSION
176     */

177    int WEB_IMAGE_EXTENSION_LENGTH = JPEG_IMAGE_EXTENSION.length();
178
179    /**
180     * Valid extension for web pages. ALways should be compared with lower case strings.
181     *
182     * @see #WEB_PAGE_EXTENSION_LENGTH
183     */

184    String JavaDoc WEB_PAGE_EXTENSION = ".html";
185
186    /**
187     * Length of WEB_PAGE_EXTENSION.
188     *
189     * @see #WEB_PAGE_EXTENSION
190     */

191    int WEB_PAGE_EXTENSION_LENGTH = WEB_PAGE_EXTENSION.length();
192
193    /**
194     * Default page to display for directory.
195     */

196    String JavaDoc DEFAULT_DIRECTORY_WEB_PAGE = "index.html";
197    
198    /**
199     * Item separator
200     */

201    String JavaDoc ITEM_SEPARATOR = ":";
202
203    /**
204     * Object separator
205     */

206    String JavaDoc OBJECT_SEPARATOR = ";";
207
208    /**
209     * Object separator 2
210     */

211    String JavaDoc OBJECT_SEPARATOR2 = "#";
212
213 }
214
Popular Tags