001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: /**
018: * @author Igor A. Pyankov
019: * @version $Revision: 1.3 $
020: */package org.apache.harmony.x.print.ipp.resources;
021:
022: import java.util.ListResourceBundle;
023:
024: /** This class represents status codes
025: * described in RFC 2911 (http://ietf.org/rfc/rfc2911.txt?number=2911)
026: */
027:
028: public class IppStatusCode extends ListResourceBundle {
029:
030: public Object[][] getContents() {
031: return statuscode;
032: }
033:
034: /*
035: * The status code values range from 0x0000 to 0x7FFF. The value ranges for each status code class are as follows:
036: *
037: * "successful" - 0x0000 to 0x00FF
038: * "informational" - 0x0100 to 0x01FF
039: * "redirection" - 0x0200 to 0x02FF
040: * "client-error" - 0x0400 to 0x04FF
041: * "server-error" - 0x0500 to 0x05FF
042: *
043: * The top half (128 values) of each range (0x0n40 to 0x0nFF, for n = 0
044: * to 5) is reserved for vendor use within each status code class.
045: * Values 0x0600 to 0x7FFF are reserved for future assignment by IETF
046: * standards track documents and MUST NOT be used.
047: */
048: static final Object[][] statuscode = {
049: /*
050: * Informational
051: * This class of status code indicates a provisional response and is to be used
052: * for informational purposes only.
053: * There are no status codes defined in IPP/1.1 for this class of status code.
054: *
055: *
056: * Successful Status Codes
057: * This class of status code indicates that the client's request was
058: * successfully received, understood, and accepted.
059: */
060: { "successful-ok", new Integer(0x0000) },
061: { "successful-ok-ignored-or-substituted-attributes",
062: new Integer(0x0001) },
063: { "successful-ok-conflicting-attributes",
064: new Integer(0x0002) },
065:
066: /*
067: * Redirection Status Codes
068: * This class of status code indicates that further action needs to be taken to
069: * fulfill the request.
070: * There are no status codes defined in IPP/1.1 for this class of status code.
071: *
072: * Client Error Status Codes
073: * This class of status code is intended for cases in which the client seems to
074: * have erred. The IPP object SHOULD return a message containing an explanation of
075: * the error situation and whether it is a temporary or permanent condition.
076: */
077: { "client-error-bad-request", new Integer(0x0400) },
078: { "client-error-forbidden", new Integer(0x0401) },
079: { "client-error-not-authenticated", new Integer(0x0402) },
080: { "client-error-not-authorized", new Integer(0x0403) },
081: { "client-error-not-possible", new Integer(0x0404) },
082: { "client-error-timeout", new Integer(0x0405) },
083: { "client-error-not-found", new Integer(0x0406) },
084: { "client-error-gone", new Integer(0x0407) },
085: { "client-error-request-entity-too-large",
086: new Integer(0x0408) },
087: { "client-error-request-value-too-long",
088: new Integer(0x0409) },
089: { "client-error-document-format-not-supported",
090: new Integer(0x040A) },
091: { "client-error-attributes-or-values-not-supported",
092: new Integer(0x040B) },
093: { "client-error-uri-scheme-not-supported",
094: new Integer(0x040C) },
095: { "client-error-charset-not-supported", new Integer(0x040D) },
096: { "client-error-conflicting-attributes",
097: new Integer(0x040E) },
098: { "client-error-compression-not-supported",
099: new Integer(0x040F) },
100: { "client-error-compression-error", new Integer(0x0410) },
101: { "client-error-document-format-error", new Integer(0x0411) },
102: { "client-error-document-access-error", new Integer(0x0412) },
103:
104: /*
105: * Server Error Status Codes
106: * This class of status codes indicates cases in which the IPP object is aware
107: * that it has erred or is incapable of performing the request. The IPP object
108: * SHOULD include a message containing an explanation of the error situation, and
109: * whether it is a temporary or permanent condition.
110: */
111: { "server-error-internal-error", new Integer(0x0500) },
112: { "server-error-operation-not-supported",
113: new Integer(0x0501) },
114: { "server-error-service-unavailable", new Integer(0x0502) },
115: { "server-error-version-not-supported", new Integer(0x0503) },
116: { "server-error-device-error", new Integer(0x0504) },
117: { "server-error-temporary-error", new Integer(0x0505) },
118: { "server-error-not-accepting-jobs", new Integer(0x0506) },
119: { "server-error-busy", new Integer(0x0507) },
120: { "server-error-job-canceled", new Integer(0x0508) },
121: { "server-error-multiple-document-jobs-not-supported",
122: new Integer(0x0509) } };
123: }
|