public static enum Status.Family extends Enum<Status.Family>
Enum Constant and Description |
---|
CLIENT_ERROR
The 4xx (Client Error) class of status code indicates that the client
seems to have erred.
|
INFORMATIONAL
The 1xx (Informational) class of status code indicates an interim
response for communicating connection status or request progress
prior to completing the requested action and sending a final
response.
|
REDIRECTION
The 3xx (Redirection) class of status code indicates that further
action needs to be taken by the user agent in order to fulfill the
request.
|
SERVER_ERROR
The 5xx (Server Error) class of status code indicates that the server
is aware that it has erred or is incapable of performing the
requested method.
|
SUCCESSFUL
The 2xx (Successful) class of status code indicates that the client's
$ request was successfully received, understood, and accepted.
|
UNKNOWN
This class of status code is for all status code above 600, that are not classified in the specification.
|
Modifier and Type | Method and Description |
---|---|
static Status.Family |
valueOf(int code)
Find the class of the given status code.
|
static Status.Family |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Status.Family[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Status.Family INFORMATIONAL
A client MUST be able to parse one or more 1xx responses received prior to a final response, even if the client does not expect one. A user agent MAY ignore unexpected 1xx responses.
A proxy MUST forward 1xx responses unless the proxy itself requested the generation of the 1xx response. For example, if a proxy adds an "Expect: 100-continue" field when it forwards a request, then it need not forward the corresponding 100 (Continue) response(s).
public static final Status.Family SUCCESSFUL
public static final Status.Family REDIRECTION
There are several types of redirects:
Note: In HTTP/1.0, the status codes 301 (Moved Permanently) and 302 (Found) were defined for the first type of redirect ([RFC1945], Section 9.3). Early user agents split on whether the method applied to the redirect target would be the same as the original request or would be rewritten as GET. Although HTTP originally defined the former semantics for 301 and 302 (to match its original implementation at CERN), and defined 303 (See Other) to match the latter semantics, prevailing practice gradually converged on the latter semantics for 301 and 302 as well. The first revision of HTTP/1.1 added 307 (Temporary Redirect) to indicate the former semantics without being impacted by divergent practice. Over 10 years later, most user agents still do method rewriting for 301 and 302; therefore, this specification makes that behavior conformant when the original request is POST.
A client SHOULD detect and intervene in cyclical redirections (i.e.,
"infinite" redirection loops).
Note: An earlier version of this specification recommended a
maximum of five redirections ([RFC2068], Section 10.3). Content
developers need to be aware that some clients might implement such
a fixed limitation.
public static final Status.Family CLIENT_ERROR
public static final Status.Family SERVER_ERROR
public static final Status.Family UNKNOWN
public static Status.Family[] values()
for (Status.Family c : Status.Family.values()) System.out.println(c);
public static Status.Family valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static Status.Family valueOf(int code)
IllegalArgumentException
will be thrown if the given integer is negative or superior to 999.code
- given HTTP status codeStatus.Family
of the given codeCopyright © 2010-2018, ForgeRock All Rights Reserved.