Source Code Cross Referenced for HttpStatus.java in  » J2EE » Enhydra-Application-Framework » com » lutris » http » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » Enhydra Application Framework » com.lutris.http 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Enhydra Java Application Server Project
003:         * 
004:         * The contents of this file are subject to the Enhydra Public License
005:         * Version 1.1 (the "License"); you may not use this file except in
006:         * compliance with the License. You may obtain a copy of the License on
007:         * the Enhydra web site ( http://www.enhydra.org/ ).
008:         * 
009:         * Software distributed under the License is distributed on an "AS IS"
010:         * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 
011:         * the License for the specific terms governing rights and limitations
012:         * under the License.
013:         * 
014:         * The Initial Developer of the Enhydra Application Server is Lutris
015:         * Technologies, Inc. The Enhydra Application Server and portions created
016:         * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
017:         * All Rights Reserved.
018:         * 
019:         * Contributor(s):
020:         * 
021:         * $Id: HttpStatus.java,v 1.2 2006-06-15 13:47:00 sinisa Exp $
022:         */
023:
024:        package com.lutris.http;
025:
026:        public class HttpStatus {
027:
028:            // Informational
029:            public final static int doContinue = 100;
030:            public final static int switchingProtocols = 101;
031:
032:            // Success
033:            public final static int ok = 200;
034:            public final static int created = 201;
035:            public final static int accepted = 202;
036:            public final static int nonAuthoritativeInformation = 203;
037:            public final static int noContent = 204;
038:            public final static int resetContent = 205;
039:            public final static int partialContent = 206;
040:
041:            // Redirection
042:            public final static int multipleChoices = 300;
043:            public final static int movedPermanently = 301;
044:            public final static int movedTemporarily = 302;
045:            public final static int seeOther = 303;
046:            public final static int notModified = 304;
047:            public final static int useProxy = 305;
048:
049:            // Client error
050:            public final static int badRequest = 400;
051:            public final static int unauthorized = 401;
052:            public final static int paymentRequired = 402;
053:            public final static int forbidden = 403;
054:            public final static int notFound = 404;
055:            public final static int methodNotAllowed = 405;
056:            public final static int notAcceptable = 406;
057:            public final static int proxyAuthenticationRequired = 407;
058:            public final static int requestTimeout = 408;
059:            public final static int conflict = 409;
060:            public final static int gone = 410;
061:            public final static int lenghtRequired = 411;
062:            public final static int preconditionFailed = 412;
063:            public final static int requestEntityTooLarge = 413;
064:            public final static int requestUriTooLarge = 414;
065:            public final static int unsupportedMediaType = 415;
066:
067:            // Server error
068:            public final static int internalServerError = 500;
069:            public final static int notImplemented = 501;
070:            public final static int badGateway = 502;
071:            public final static int serviceUnavailable = 503;
072:            public final static int gatewayTimeout = 504;
073:            public final static int httpVersionNotSupported = 505;
074:
075:            /*
076:             * Table of default messages.  First dimension is indexed by
077:             * (code / 100) - 1 and second diminsion by the remainder, with
078:             * the last element of each class being a default value if
079:             * the status code is past the end.
080:             */
081:            private static final String[][] statusMsgs = { {
082:            /* 100 */"Continue",
083:            /* 101 */"Switching Protocols",
084:            /* 1xx */"Informational", }, {
085:            /* 200 */"OK",
086:            /* 201 */"Created",
087:            /* 202 */"Accepted",
088:            /* 203 */"Non-Authoritative Information",
089:            /* 204 */"No Content",
090:            /* 205 */"Reset Content",
091:            /* 206 */"Partial Content",
092:            /* 2xx */"Success", }, {
093:            /* 300 */"Multiple Choices",
094:            /* 301 */"Moved Permanently",
095:            /* 302 */"Moved Temporarily",
096:            /* 303 */"See Other",
097:            /* 304 */"Not Modified",
098:            /* 305 */"Use Proxy",
099:            /* 3xx */"Redirection", }, {
100:            /* 400 */"Bad Request",
101:            /* 401 */"Unauthorized",
102:            /* 402 */"Payment Required",
103:            /* 403 */"Forbidden",
104:            /* 404 */"Not Found",
105:            /* 405 */"Method Not Allowed",
106:            /* 406 */"Not Acceptable",
107:            /* 407 */"Proxy Authentication Required",
108:            /* 408 */"Request Time-out",
109:            /* 409 */"Conflict",
110:            /* 410 */"Gone",
111:            /* 411 */"Length Required",
112:            /* 412 */"Precondition Failed",
113:            /* 413 */"Request Entity Too Large",
114:            /* 414 */"Request-URI Too Large",
115:            /* 415 */"Unsupported Media Type",
116:            /* 4xx */"Client Error", }, {
117:            /* 500 */"Internal Server Error",
118:            /* 501 */"Not Implemented",
119:            /* 502 */"Bad Gateway",
120:            /* 503 */"Service Unavailable",
121:            /* 504 */"Gateway Time-out",
122:            /* 505 */"HTTP Version not supported",
123:            /* 5xx */"Server Error", } };
124:
125:            /**
126:             * Get the default status message for a HTTP status code.
127:             */
128:            public static String getStatusMsg(int statusCode) {
129:                int codeSet = (statusCode / 100);
130:                int setIdx = statusCode - (codeSet * 100);
131:                if ((codeSet <= 0) || (codeSet > statusMsgs.length)) {
132:                    return "Invalid status code";
133:                }
134:                if (setIdx >= statusMsgs[codeSet - 1].length) {
135:                    setIdx = statusMsgs[codeSet - 1].length - 1;
136:                }
137:                return statusMsgs[codeSet - 1][setIdx];
138:            }
139:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.