KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > verifier > tests > web > ErrorCodeTypes


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.tools.verifier.tests.web;
24
25 /** Error code element contains an HTTP error code type within web application
26  * test.
27  * i.e. 404
28  * Define all error code type here
29  * taken from -
30  * http://www.w3.org/Protocols/HTTP/1.1/draft-ietf-http-v11-spec-rev-05.txt
31  */

32 public class ErrorCodeTypes {
33     // taken from -
34
// http://www.w3.org/Protocols/HTTP/1.1/draft-ietf-http-v11-spec-rev-05.txt
35
// Chapter 10 Status Code Definitions ......................................53
36

37     // 10.1 Informational 1xx ...........................................53
38
public static final int CONTINUE = 100; // Continue
39
public static final int SWITCHING_PROTOCOLS = 101; // Switching Protocols
40

41     // 10.2 Successful 2xx ...........................................54
42
public static final int OK = 200; // OK
43
public static final int CREATED = 201; // Created
44
public static final int ACCEPTED = 202; // Accepted
45
public static final int NON_AUTHORITATIVE_INFORMATION = 203; // Non-Authoritative Information
46
public static final int NO_CONTENT = 204; // No Content
47
public static final int RESET_CONTENT = 205; // Reset Content
48
public static final int PARTIAL_CONTENT = 206; // Partial Content
49

50     // Redirection 3xx ..........................................57
51
public static final int MULTIPLE_CHOICES = 300; // Multiple Choices
52
public static final int MOVED_PERMANENTLY = 301; // Moved Permanently
53
public static final int FOUND = 302; // Found
54
public static final int SEE_OTHER = 303; // See Other
55
public static final int NOT_MODIFIED = 304; // Not Modified
56
public static final int USE_PROXY = 305; // Use Proxy
57
public static final int UNUSED = 306; // (Unused)
58
public static final int TEMPORARY_REDIRECT = 307; // Temporary Redirect
59

60     // Client Error 4xx .........................................60
61
public static final int BAD_REQUEST = 400; // Bad Request
62
public static final int UNAUTHORIZED = 401; // Unauthorized
63
public static final int PAYMENT_REQUIRED = 402; // Payment Required
64
public static final int FORBIDDEN = 403; // Forbidden
65
public static final int NOT_FOUND = 404; // Not Found
66
public static final int METHOD_NOT_ALLOWED = 405; // Method Not Allowed
67
public static final int NOT_ACCEPTABLE = 406; // Not Acceptable
68
public static final int PROXY_AUTHENTICATION_REQUIRED = 407; // Proxy Authentication Required
69
public static final int REQUEST_TIMEOUT = 408; // Request Timeout
70
public static final int CONFLICT = 409; // Conflict
71
public static final int GONE = 410; // Gone
72
public static final int LENGTH_REQUIRED = 411; // Length Required
73
public static final int PRECONDITION_FAILED = 412; // Precondition Failed
74
public static final int REQUEST_ENTITY_TOO_LARGE = 413; // Request Entity Too Large
75
public static final int REQUEST_URI_TOO_LONG = 414; // Request-URI Too Long
76
public static final int UNSUPPORTED_MEDIA_TYPE = 415; // Unsupported Media Type
77
public static final int REQUESTED_RANGE_NOT_SATISFIABLE = 416; // Requested Range Not Satisfiable
78
public static final int EXPECTATION_FAILED = 417; // Expectation Failed
79

80     // Server Error 5xx .........................................65
81
public static final int INTERNAL_SERVER_ERROR = 500; // Internal Server Error
82
public static final int NOT_IMPLEMENTED = 501; // Not Implemented
83
public static final int BAD_GATEWAY = 502; // Bad Gateway
84
public static final int SERVICE_UNAVAILABLE = 503; // Service Unavailable
85
public static final int GATEWAY_TIMEOUT = 504; // Gateway Timeout
86
public static final int HTTP_VERSION_NOT_SUPPORTED = 505; // HTTP Version Not Supported
87

88 }
89
Popular Tags