public final class HttpStatus extends Object
| Constructor and Description |
|---|
HttpStatus(int code,
String message)
Constructs a new
HttpStatus without any localization support. |
HttpStatus(int code,
String message,
LocalizedMessage localizedMessage)
Constructs a new
HttpStatus. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Determines if this status equals another [object].
|
static HttpStatus |
forCode(int statusCode)
Retrieves the
HttpStatus constant for a supplied status code. |
int |
getCode()
Retrieves the Status-Code, which is a 3-digit integer result code of the attempt to understand and satisfy the
request.
|
LocalizedMessage |
getLocalizedMessage()
Retrieves the localized status message, which may be more suitable for presenting to an end-user in a response.
|
String |
getMessage()
Retrieves the standard Reason-Phrase, which is intended to give a short textual description of the Status-Code to
a human user.
|
int |
hashCode() |
String |
toString() |
public static final HttpStatus CONTINUE
public static final HttpStatus SWITCHING_PROTOCOLS
public static final HttpStatus OK
public static final HttpStatus CREATED
public static final HttpStatus ACCEPTED
public static final HttpStatus NON_AUTHORITATIVE_INFORMATION
public static final HttpStatus NO_CONTENT
public static final HttpStatus RESET_CONTENT
public static final HttpStatus PARTIAL_CONTENT
public static final HttpStatus MULTIPLE_CHOICES
public static final HttpStatus MOVED_PERMANENTLY
public static final HttpStatus FOUND
public static final HttpStatus SEE_OTHER
public static final HttpStatus NOT_MODIFIED
public static final HttpStatus USE_PROXY
public static final HttpStatus TEMPORARY_REDIRECT
public static final HttpStatus PERMANENT_REDIRECT
public static final HttpStatus BAD_REQUEST
public static final HttpStatus UNAUTHORIZED
public static final HttpStatus PAYMENT_REQUIRED
public static final HttpStatus FORBIDDEN
public static final HttpStatus NOT_FOUND
public static final HttpStatus METHOD_NOT_ALLOWED
public static final HttpStatus NOT_ACCEPTABLE
public static final HttpStatus PROXY_AUTHENTICATION_REQUIRED
public static final HttpStatus REQUEST_TIMEOUT
public static final HttpStatus CONFLICT
public static final HttpStatus GONE
public static final HttpStatus LENGTH_REQUIRED
public static final HttpStatus PRECONDITION_FAILED
public static final HttpStatus REQUEST_ENTITY_TOO_LARGE
public static final HttpStatus REQUEST_URI_TOO_LONG
public static final HttpStatus UNSUPPORTED_MEDIA_TYPE
public static final HttpStatus REQUESTED_RANGE_NOT_SATISFIABLE
public static final HttpStatus EXPECTATION_FAILED
public static final HttpStatus UNPROCESSABLE_ENTITY
public static final HttpStatus PRECONDITION_REQUIRED
public static final HttpStatus TOO_MANY_REQUESTS
public static final HttpStatus REQUEST_HEADER_FIELDS_TOO_LARGE
public static final HttpStatus INTERNAL_SERVER_ERROR
public static final HttpStatus NOT_IMPLEMENTED
public static final HttpStatus BAD_GATEWAY
public static final HttpStatus SERVICE_UNAVAILABLE
public static final HttpStatus GATEWAY_TIMEOUT
public static final HttpStatus HTTP_VERSION_NOT_SUPPORTED
public static final HttpStatus NETWORK_AUTHENTICATION_REQUIRED
public static final HttpStatus ALLOWED
public static final HttpStatus REQUEST_BODY_REQUIRED
public HttpStatus(int code,
String message,
LocalizedMessage localizedMessage)
HttpStatus.code - the response status codemessage - the standard, non-localized status message (Reason-Phrase)localizedMessage - the localized status messagepublic HttpStatus(int code,
String message)
HttpStatus without any localization support.code - the response status codemessage - the standard, non-localized status message (Reason-Phrase)public int getCode()
public String getMessage()
The getLocalizedMessage() method can be used to retrieve a value that may be customized for a specific
Locale.
public LocalizedMessage getLocalizedMessage()
public boolean equals(Object o)
HttpStatus are considered equal if
they have the same status code, regardless of messages.equals in class Objecto - the object with which to compareHttpStatus and has the same status code (as
returned by getCode())public String toString()
public static HttpStatus forCode(int statusCode)
HttpStatus constant for a supplied status code.
For example, given the status code 404, this method will return NOT_FOUND.
statusCode - the status code for which to find a matching constantCopyright 2023 Ping Identity Corp. All rights reserved.