01: /* JFox, the OpenSource J2EE Application Server
02: *
03: * Copyright (C) 2002 huihoo.com
04: * Distributable under GNU LGPL license
05: * See the GNU Lesser General Public License for more details.
06: */
07:
08: package org.huihoo.jfox.jmx.adaptor.http;
09:
10: /**
11: *
12: * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
13: */
14:
15: public class HttpConstants {
16: public static final String CRLF = "\r\n";
17:
18: public static final String HTTP_REPLY_OK = "OK";
19: public static final int HTTP_REPLY_OK_ID = 200;
20: public static final String HTTP_ERROR_BAD_REQUEST = "Bad Request";
21: public static final int HTTP_ERROR_BAD_REQUEST_ID = 400;
22: public static final String HTTP_ERROR_UNAUTHORIZED_REQUEST = "Unauthorized";
23: public static final int HTTP_ERROR_UNAUTHORIZED_REQUEST_ID = 401;
24: public static final String HTTP_ERROR_NOT_FOUND = "Not Found";
25: public static final int HTTP_ERROR_NOT_FOUND_ID = 404;
26:
27: public static final String HTTP_ERROR_DOMAIN_NOT_FOUND = "Domain Not Found";
28: public static final int HTTP_ERROR_DOMAIN_NOT_FOUND_ID = 455;
29: public static final String HTTP_ERROR_INSTANTIATION = "Instantiation Error";
30: public static final int HTTP_ERROR_INSTANTIATION_ID = 456;
31: public static final String HTTP_ERROR_ILLEGAL_ACCESS = "Illegal Access";
32: public static final int HTTP_ERROR_ILLEGAL_ACCESS_ID = 457;
33: public static final String HTTP_ERROR_SERVICE_NOT_FOUND = "Service Not Found";
34: public static final int HTTP_ERROR_SERVICE_NOT_FOUND_ID = 458;
35: public static final String HTTP_ERROR_INSTANCE_NOT_FOUND = "Instance Not Found";
36: public static final int HTTP_ERROR_INSTANCE_NOT_FOUND_ID = 459;
37: public static final String HTTP_ERROR_CLASS_NOT_FOUND = "Class Not Found";
38: public static final int HTTP_ERROR_CLASS_NOT_FOUND_ID = 460;
39: public static final String HTTP_ERROR_PROPERTY_NOT_FOUND = "Property Not Found";
40: public static final int HTTP_ERROR_PROPERTY_NOT_FOUND_ID = 462;
41: public static final String HTTP_ERROR_INVOCATION_TARGET = "Invocation Target";
42: public static final int HTTP_ERROR_INVOCATION_TARGET_ID = 463;
43: public static final String HTTP_ERROR_INVALID_PROP_VALUE = "Invalid Property Value";
44: public static final int HTTP_ERROR_INVALID_PROP_VALUE_ID = 464;
45: public static final String HTTP_ERROR_INSTANCE_ALREADY_EXISTS = "Instance Already Exists";
46: public static final int HTTP_ERROR_INSTANCE_ALREADY_EXISTS_ID = 465;
47: public static final String HTTP_ERROR_NO_SUCH_METHOD = "No Such Method";
48: public static final int HTTP_ERROR_NO_SUCH_METHOD_ID = 466;
49: public static final String HTTP_ERROR_PERMISSION_DENIED = "Permission Denied";
50: public static final int HTTP_ERROR_PERMISSION_DENIED_ID = 469;
51: public static final String HTTP_ERROR_REFLECTION = "Reflection";
52: public static final int HTTP_ERROR_REFLECTION_ID = 470;
53: public static final String HTTP_ERROR_MBEAN_REGISTRATION = "MBean Registration Failure";
54: public static final int HTTP_ERROR_MBEAN_REGISTRATION_ID = 471;
55: public static final String HTTP_ERROR_MBEAN = "MBean Failure";
56: public static final int HTTP_ERROR_MBEAN_ID = 472;
57: public static final String HTTP_ERROR_NOT_COMPLIANT_MBEAN = "Not Compliant MBean";
58: public static final int HTTP_ERROR_NOT_COMPLIANT_MBEAN_ID = 473;
59: public static final String HTTP_ERROR_MALFORMED_OBJECTNAME = "Malformed ObjectName";
60: public static final int HTTP_ERROR_MALFORMED_OBJECTNAME_ID = 474;
61: public static final String HTTP_ERROR_ATTRIBUTE_NOT_FOUND = "Attribute Not Found";
62: public static final int HTTP_ERROR_ATTRIBUTE_NOT_FOUND_ID = 475;
63: public static final String HTTP_ERROR_INTROSPECTION = "Introspection";
64: public static final int HTTP_ERROR_INTROSPECTION_ID = 476;
65: public static final String HTTP_ERROR_SET_ATTRIBUTES = "All Attributes Not Set";
66: public static final int HTTP_ERROR_SET_ATTRIBUTES_ID = 477;
67:
68: public static final int HTTP_BAD_REQUEST = -1;
69: public static final int HTTP_GET_REQUEST = 1;
70: public static final int HTTP_POST_REQUEST = 2;
71: public static final int HTTP_HEAD_REQUEST = 3;
72:
73: public static final String CONTENT_LENGTH_HEADER = "Content-Length";
74: public static final String CONTENT_TYPE_HEADER = "Content-Type";
75: public static final String DATE_HEADER = "Date";
76: public static final String CONNECTION = "Connection";
77: public static final String WWW_AUTHENTICATE_HEADER = "WWW-Authenticate";
78: public static final String AUTHORIZATION_HEADER = "Authorization";
79:
80: }
|