2 import org.opensrf.util.*;
6 public static final int CONTINUE = 100;
7 public static final int OK = 200;
8 public static final int ACCEPTED = 202;
9 public static final int COMPLETE = 205;
10 public static final int REDIRECTED = 307;
11 public static final int EST = 400;
12 public static final int STATUS_UNAUTHORIZED = 401;
13 public static final int FORBIDDEN = 403;
14 public static final int NOTFOUND = 404;
15 public static final int NOTALLOWED = 405;
16 public static final int TIMEOUT = 408;
17 public static final int EXPFAILED = 417;
18 public static final int INTERNALSERVERERROR = 500;
19 public static final int NOTIMPLEMENTED = 501;
20 public static final int VERSIONNOTSUPPORTED = 505;
22 private OSRFRegistry registry = OSRFRegistry.registerObject(
24 OSRFRegistry.WireProtocol.HASH,
25 new String[] {"status", "statusCode"});
27 /** The name of the status */
29 /** The status code */
32 public Status(String status, int statusCode) {
34 this.statusCode = statusCode;
37 public int getStatusCode() {
40 public String getStatus() {
45 * Implements the generic get() API required by OSRFSerializable
47 public Object get(String field) {
48 if("status".equals(field))
50 if("statusCode".equals(field))
51 return new Integer(getStatusCode());
56 * @return The osrfMessage registry.
58 public OSRFRegistry getRegistry() {