KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > boot > HttpConstants


1 /*
2  * SSL-Explorer
3  *
4  * Copyright (C) 2003-2006 3SP LTD. All Rights Reserved
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */

19             
20 package com.sslexplorer.boot;
21
22 /**
23  * A set of constants useful in working with the HTTP protocol, including
24  * headers methods and repsonses.
25  *
26  * @author Brett Smith <a HREF="mailto: brett@3sp.com">&lt;brett@3sp.com&gt;</a>
27  * @author Lee David Painter <a HREF="mailto: lee@3sp.com">&lt;lee@3sp.com&gt;</a>
28  */

29 public class HttpConstants {
30     
31     /*
32      * Headers
33      */

34
35     /**
36      * If modified since
37      */

38     public static final String JavaDoc HDR_IF_MODIFIED_SINCE = "If-Modified-Since";
39
40     /**
41      * Proxy Connection
42      */

43     public static final String JavaDoc HDR_PROXY_CONNECTION = "Proxy-Connection";
44
45     /**
46      * Close
47      */

48     public static final String JavaDoc HDR_CLOSE = "Close";
49
50     /**
51      * Cookie
52      */

53     public static final String JavaDoc HDR_COOKIE = "Cookie";
54
55     /**
56      * X-Forwarded-For
57      */

58     public static final String JavaDoc HDR_X_FORWARDED_FOR = "X-Forwarded-For";
59
60     /**
61      * Accept-Encoding
62      */

63     public static final String JavaDoc HDR_ACCEPT_ENCODING = "Accept-Encoding";
64
65     /**
66      * Transfer-Encoding
67      */

68     public static final String JavaDoc HDR_TRANSFER_ENCODING = "Transfer-Encoding";
69
70     /**
71      * TE
72      */

73     public static final String JavaDoc HDR_TE = "TE";
74
75     /**
76      * Trailer
77      */

78     public static final String JavaDoc HDR_TRAILER = "Trailer";
79
80     /**
81      * Proxy Authorization
82      */

83     public static final String JavaDoc HDR_PROXY_AUTHORIZATION = "Proxy-Authorization";
84
85     /**
86      * Proxy Authenitcate
87      */

88     public static final String JavaDoc HDR_PROXY_AUTHENTICATE = "Proxy-Authenticate";
89
90     /**
91      * Upgrade
92      */

93     public static final String JavaDoc HDR_UPGRADE = "Upgrade";
94
95     /**
96      * keep-alive
97      */

98     public static final String JavaDoc HDR_KEEP_ALIVE = "Keep-Alive";
99
100     /**
101      * Content-Type
102      */

103     public static final String JavaDoc HDR_CONTENT_TYPE = "Content-Type";
104
105     /**
106      * Content-Length
107      */

108     public static final String JavaDoc HDR_CONTENT_LENGTH = "Content-Length";
109
110     /**
111      * Host
112      */

113     public final static String JavaDoc HDR_HOST = "Host";
114     
115     /**
116      * Referer
117      */

118     public final static String JavaDoc HDR_REFERER = "Referer";
119     
120     /**
121      * Referer
122      */

123     public final static String JavaDoc HDR_CONNECTION = "Connection";
124     
125     /**
126      * Authorization
127      */

128     public static final String JavaDoc HDR_AUTHORIZATION = "Authorization";
129     
130     /**
131      * WWW-Authenticate
132      */

133     public static final String JavaDoc HDR_WWW_AUTHENTICATE = "WWW-Authenticate";
134
135     /**
136      * Content-Encoding
137      */

138     public static final String JavaDoc HDR_CONTENT_ENCODING = "Content-Encoding";
139
140     /**
141      * Location
142      */

143     public static final String JavaDoc HDR_LOCATION = "Location";
144
145     /**
146      * Cache-Control
147      */

148     public static final String JavaDoc HDR_CACHE_CONTROL = "Cache-Control";
149
150     /**
151      * Server header
152      */

153     public static final String JavaDoc HDR_SERVER = "Server";
154
155     /**
156      * Server header
157      */

158     public static final String JavaDoc HDR_DATE = "Date";
159
160     /**
161      * Pragma
162      */

163     public static final String JavaDoc HDR_PRAGMA = "Pragma";
164     
165     /**
166      * Expires
167      */

168     public static final String JavaDoc HDR_EXPIRES = "Expires";
169
170     /**
171      * Set cookie
172      */

173     public static final String JavaDoc HDR_SET_COOKIE = "Set-Cookie";
174     
175     /*
176      * Http methods
177      */

178     
179     /**
180      * Connect
181      */

182     public final static String JavaDoc METHOD_CONNECT = "CONNECT";
183     
184     /**
185      * Get
186      */

187     public final static String JavaDoc METHOD_GET = "GET";
188     
189     /**
190      * Get
191      */

192     public final static String JavaDoc METHOD_POST = "POST";
193     
194     /**
195      * 200 - OK
196      */

197     public static final int RESP_200_OK = 200;
198
199     /**
200      * 304 - Not modified
201      */

202     public static final int RESP_304_NOT_MODIFIED = 304;
203     
204     /**
205      * 401 - Unauthorized
206      */

207     public static final int RESP_401_UNAUTHORIZED = 401;
208     
209     /**
210      * 403 - Forbidden
211      */

212     public final static int RESP_403_FORBIDDEN = 403;
213     
214     /**
215      * 407 - Proxy authentication required
216      */

217     public static final int RESP_407_PROXY_AUTHENTICATION_REQUIRED = 407;
218     
219     /**
220      * 500 - Internal server error
221      */

222     public static final int RESP_500_INTERNAL_SERVER_ERROR = 500;
223
224     /**
225      * 503 - Service unavailable
226      */

227     public static final int RESP_503_SERVICE_UNAVAILABLE = 503;
228
229 }
230
Popular Tags