Class Status

java.lang.Object
org.restlet.data.Status

public final class Status extends Object
Status to return after handling a call.
Author:
Jerome Louvel
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Status
    The request could not be understood by the server due to malformed syntax.
    static final Status
    The request could not be completed due to a conflict with the current state of the resource (as experienced in a version control system).
    static final Status
    The user agent expects some behavior of the server (given in an Expect request-header field), but this expectation could not be met by this server.
    static final Status
    The server understood the request, but is refusing to fulfill it as it could be explained in the entity.
    static final Status
    The requested resource is no longer available at the server and no forwarding address is known.
    static final Status
    The server refuses to accept the request without a defined Content-Length.
    static final Status
    The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.
    static final Status
    The resource identified by the request is only capable of generating response entities whose content characteristics do not match the user's requirements (in Accept* headers).
    static final Status
    The server has not found anything matching the Request-URI or the server does not wish to reveal exactly why the request has been refused, or no other response is applicable.
    static final Status
    This code is reserved for future use.
    static final Status
    Sent by the server when the user agent asks the server to carry out a request under certain conditions that are not met.
    static final Status
    This code is similar to 401 (Unauthorized), but indicates that the client must first authenticate itself with the proxy.
    static final Status
    The server is refusing to process a request because the request entity is larger than the server is willing or able to process.
    static final Status
    Sent by the server when an HTTP client opens a connection, but has never sent a request (or never sent the blank line that signals the end of the request).
    static final Status
    The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret.
    static final Status
    The request includes a Range request-header field and the selected resource is too small for any of the byte-ranges to apply.
    static final Status
    The server refuses to accept the request because the user has sent too many requests in a given amount of time.
    static final Status
    The request requires user authentication.
    static final Status
    The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method.
    static final Status
    The client connector faced an error during the communication with the remote server (interruption, timeout, etc.).
    static final Status
    The client connector could not connect to the remote server.
    static final Status
    The client connector faced an internal error during the process of a request to its server or the process of a response to its client.
    static final Status
    This interim response (the client has to wait for the final response) is used to inform the client that the initial part of the request has been received and has not yet been rejected or completed by the server.
    static final Status
    Warning status code, typically returned by a cache, indicating that it is intentionally disconnected from the rest of the network for a period of time.
    static final Status
    Warning status code, typically returned by a cache, indicating that it heuristically chose a freshness lifetime greater than 24 hours and the response's age is greater than 24 hours.
    static final Status
    Warning status code, optionally including arbitrary information to be presented to a human user, typically returned by a cache.
    static final Status
    Warning status code, typically returned by a cache, indicating that the response is stale because an attempt to revalidate the response failed, due to an inability to reach the server.
    static final Status
    Warning status code, typically returned by a cache, indicating that the response is stale.
    static final Status
    The server understands and is willing to comply with the client's request, via the Upgrade message header field, for a change in the application protocol being used on this connection.
    static final Status
    The requested resource resides temporarily under a different URI which should not be used for future requests by the client (use status codes 303 or 307 instead since this status has been manifestly misused).
    static final Status
    The server lets the user agent choosing one of the multiple representations of the requested resource, each representation having its own specific location provided in the response entity.
    static final Status
    Status code sent by the server in response to a conditional GET request in case the document has not been modified.
    static final Status
    The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs.
    static final Status
    The response to the request can be found under a different URI and SHOULD be retrieved using a GET method on that resource.
    static final Status
    The requested resource resides temporarily under a different URI which should not be used for future requests by the client.
    static final Status
    The requested resource MUST be accessed through the proxy given by the Location field.
    static final Status
    The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.
    static final Status
    The server, while acting as a gateway or proxy, could not connect to the upstream server.
    static final Status
    The server encountered an unexpected condition which prevented it from fulfilling the request.
    static final Status
    The server does not support the functionality required to fulfill the request.
    static final Status
    The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
    static final Status
    The server does not support, or refuses to support, the HTTP protocol version that was used in the request message.
    static final Status
    The request has been accepted for processing, but the processing has not been completed.
    static final Status
    The request has been fulfilled and resulted in a new resource being created.
    static final Status
    Warning status code, optionally including arbitrary information to be presented to a human user, typically returned by a cache.
    static final Status
    The server has fulfilled the request but does not need to return an entity-body (for example after a DELETE), and might want to return updated meta-information.
    static final Status
    The request has succeeded but the returned meta-information in the entity-header does not come from the origin server, but is gathered from a local or a third-party copy.
    static final Status
    The request has succeeded.
    static final Status
    The server has fulfilled the partial GET request for the resource assuming the request has included a Range header field indicating the desired range.
    static final Status
    The server has fulfilled the request, and the user agent SHOULD reset the document view which caused the request to be sent.
    static final Status
    Warning status code, typically returned by a cache or a proxy, indicating that the response has been transformed.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Status(int code)
    Constructor.
    Status(int code, String reasonPhrase)
    Constructor.
    Status(int code, String reasonPhrase, String description)
    Constructor.
    Status(int code, String reasonPhrase, String description, String uri)
    Constructor.
    Status(int code, Throwable throwable)
    Constructor.
    Status(int code, Throwable throwable, String reasonPhrase)
    Constructor.
    Status(int code, Throwable throwable, String reasonPhrase, String description)
    Constructor.
    Status(int code, Throwable throwable, String reasonPhrase, String description, String uri)
    Constructor.
    Status(Status status, String description)
    Constructor.
    Status(Status status, String reasonPhrase, String description)
    Constructor.
    Status(Status status, Throwable throwable)
    Constructor.
    Status(Status status, Throwable throwable, String reasonPhrase)
    Constructor.
    Status(Status status, Throwable throwable, String reasonPhrase, String description)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object object)
    Indicates if the status is equal to a given one.
    int
    Returns the corresponding code (HTTP or custom code).
    Returns the description.
    Returns the reason phrase of this status.
    Returns the related error or exception.
    Returns the URI of the specification describing the status.
    int
    boolean
    Indicates if the status is a client error status, meaning "The request contains bad syntax or cannot be fulfilled".
    static boolean
    isClientError(int code)
    Indicates if the status is a client error status, meaning "The request contains bad syntax or cannot be fulfilled".
    boolean
    Indicates if the status is a connector error status, meaning "The connector failed to send or receive an apparently valid message".
    static boolean
    isConnectorError(int code)
    Indicates if the status is a connector error status, meaning "The connector failed to send or receive an apparently valid message".
    boolean
    Indicates if the status is an error (client or server) status.
    static boolean
    isError(int code)
    Indicates if the status is an error (client or server) status.
    boolean
    Indicates if the status is a global error status, meaning "The server has definitive information about a particular user".
    static boolean
    isGlobalError(int code)
    Indicates if the status is a client error status, meaning "The request contains bad syntax or cannot be fulfilled".
    boolean
    Indicates if the status is an information status, meaning "request received, continuing process".
    static boolean
    isInformational(int code)
    Indicates if the status is an information status, meaning "request received, continuing process".
    boolean
    Indicates if an error is recoverable, meaning that simply retrying after a delay could result in a success.
    boolean
    Indicates if the status is a redirection status, meaning "Further action must be taken in order to complete the request".
    static boolean
    isRedirection(int code)
    Indicates if the status is a redirection status, meaning "Further action must be taken in order to complete the request".
    boolean
    Indicates if the status is a server error status, meaning "The server failed to fulfill an apparently valid request".
    static boolean
    isServerError(int code)
    Indicates if the status is a server error status, meaning "The server failed to fulfill an apparently valid request".
    boolean
    Indicates if the status is a success status, meaning "The action was successfully received, understood, and accepted".
    static boolean
    isSuccess(int code)
    Indicates if the status is a success status, meaning "The action was successfully received, understood, and accepted".
    Returns the reason phrase of the status followed by its HTTP code.
    static Status
    valueOf(int code)
    Returns the status associated to a code.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • CLIENT_ERROR_BAD_REQUEST

      public static final Status CLIENT_ERROR_BAD_REQUEST
      The request could not be understood by the server due to malformed syntax.
      See Also:
    • CLIENT_ERROR_CONFLICT

      public static final Status CLIENT_ERROR_CONFLICT
      The request could not be completed due to a conflict with the current state of the resource (as experienced in a version control system).
      See Also:
    • CLIENT_ERROR_EXPECTATION_FAILED

      public static final Status CLIENT_ERROR_EXPECTATION_FAILED
      The user agent expects some behavior of the server (given in an Expect request-header field), but this expectation could not be met by this server.
      See Also:
    • CLIENT_ERROR_FORBIDDEN

      public static final Status CLIENT_ERROR_FORBIDDEN
      The server understood the request, but is refusing to fulfill it as it could be explained in the entity.
      See Also:
    • CLIENT_ERROR_GONE

      public static final Status CLIENT_ERROR_GONE
      The requested resource is no longer available at the server and no forwarding address is known.
      See Also:
    • CLIENT_ERROR_LENGTH_REQUIRED

      public static final Status CLIENT_ERROR_LENGTH_REQUIRED
      The server refuses to accept the request without a defined Content-Length.
      See Also:
    • CLIENT_ERROR_METHOD_NOT_ALLOWED

      public static final Status CLIENT_ERROR_METHOD_NOT_ALLOWED
      The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.
      See Also:
    • CLIENT_ERROR_NOT_ACCEPTABLE

      public static final Status CLIENT_ERROR_NOT_ACCEPTABLE
      The resource identified by the request is only capable of generating response entities whose content characteristics do not match the user's requirements (in Accept* headers).
      See Also:
    • CLIENT_ERROR_NOT_FOUND

      public static final Status CLIENT_ERROR_NOT_FOUND
      The server has not found anything matching the Request-URI or the server does not wish to reveal exactly why the request has been refused, or no other response is applicable.
      See Also:
    • CLIENT_ERROR_PAYMENT_REQUIRED

      public static final Status CLIENT_ERROR_PAYMENT_REQUIRED
      This code is reserved for future use.
      See Also:
    • CLIENT_ERROR_PRECONDITION_FAILED

      public static final Status CLIENT_ERROR_PRECONDITION_FAILED
      Sent by the server when the user agent asks the server to carry out a request under certain conditions that are not met.
      See Also:
    • CLIENT_ERROR_PROXY_AUTHENTIFICATION_REQUIRED

      public static final Status CLIENT_ERROR_PROXY_AUTHENTIFICATION_REQUIRED
      This code is similar to 401 (Unauthorized), but indicates that the client must first authenticate itself with the proxy.
      See Also:
    • CLIENT_ERROR_REQUEST_ENTITY_TOO_LARGE

      public static final Status CLIENT_ERROR_REQUEST_ENTITY_TOO_LARGE
      The server is refusing to process a request because the request entity is larger than the server is willing or able to process.
      See Also:
    • CLIENT_ERROR_REQUEST_TIMEOUT

      public static final Status CLIENT_ERROR_REQUEST_TIMEOUT
      Sent by the server when an HTTP client opens a connection, but has never sent a request (or never sent the blank line that signals the end of the request).
      See Also:
    • CLIENT_ERROR_REQUEST_URI_TOO_LONG

      public static final Status CLIENT_ERROR_REQUEST_URI_TOO_LONG
      The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret.
      See Also:
    • CLIENT_ERROR_REQUESTED_RANGE_NOT_SATISFIABLE

      public static final Status CLIENT_ERROR_REQUESTED_RANGE_NOT_SATISFIABLE
      The request includes a Range request-header field and the selected resource is too small for any of the byte-ranges to apply.
      See Also:
    • CLIENT_ERROR_TOO_MANY_REQUESTS

      public static final Status CLIENT_ERROR_TOO_MANY_REQUESTS
      The server refuses to accept the request because the user has sent too many requests in a given amount of time.
      See Also:
    • CLIENT_ERROR_UNAUTHORIZED

      public static final Status CLIENT_ERROR_UNAUTHORIZED
      The request requires user authentication.
      See Also:
    • CLIENT_ERROR_UNSUPPORTED_MEDIA_TYPE

      public static final Status CLIENT_ERROR_UNSUPPORTED_MEDIA_TYPE
      The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method.
      See Also:
    • CONNECTOR_ERROR_COMMUNICATION

      public static final Status CONNECTOR_ERROR_COMMUNICATION
      The client connector faced an error during the communication with the remote server (interruption, timeout, etc.). The status code is 1001.
    • CONNECTOR_ERROR_CONNECTION

      public static final Status CONNECTOR_ERROR_CONNECTION
      The client connector could not connect to the remote server. The status code is 1000.
    • CONNECTOR_ERROR_INTERNAL

      public static final Status CONNECTOR_ERROR_INTERNAL
      The client connector faced an internal error during the process of a request to its server or the process of a response to its client. The status code is 1002.
    • INFO_CONTINUE

      public static final Status INFO_CONTINUE
      This interim response (the client has to wait for the final response) is used to inform the client that the initial part of the request has been received and has not yet been rejected or completed by the server.
      See Also:
    • INFO_DISCONNECTED_OPERATION

      public static final Status INFO_DISCONNECTED_OPERATION
      Warning status code, typically returned by a cache, indicating that it is intentionally disconnected from the rest of the network for a period of time.
      See Also:
    • INFO_HEURISTIC_EXPIRATION

      public static final Status INFO_HEURISTIC_EXPIRATION
      Warning status code, typically returned by a cache, indicating that it heuristically chose a freshness lifetime greater than 24 hours and the response's age is greater than 24 hours.
      See Also:
    • INFO_MISC_WARNING

      public static final Status INFO_MISC_WARNING
      Warning status code, optionally including arbitrary information to be presented to a human user, typically returned by a cache.
      See Also:
    • INFO_REVALIDATION_FAILED

      public static final Status INFO_REVALIDATION_FAILED
      Warning status code, typically returned by a cache, indicating that the response is stale because an attempt to revalidate the response failed, due to an inability to reach the server.
      See Also:
    • INFO_STALE_RESPONSE

      public static final Status INFO_STALE_RESPONSE
      Warning status code, typically returned by a cache, indicating that the response is stale.
      See Also:
    • INFO_SWITCHING_PROTOCOL

      public static final Status INFO_SWITCHING_PROTOCOL
      The server understands and is willing to comply with the client's request, via the Upgrade message header field, for a change in the application protocol being used on this connection.
      See Also:
    • REDIRECTION_FOUND

      public static final Status REDIRECTION_FOUND
      The requested resource resides temporarily under a different URI which should not be used for future requests by the client (use status codes 303 or 307 instead since this status has been manifestly misused).
      See Also:
    • REDIRECTION_MULTIPLE_CHOICES

      public static final Status REDIRECTION_MULTIPLE_CHOICES
      The server lets the user agent choosing one of the multiple representations of the requested resource, each representation having its own specific location provided in the response entity.
      See Also:
    • REDIRECTION_NOT_MODIFIED

      public static final Status REDIRECTION_NOT_MODIFIED
      Status code sent by the server in response to a conditional GET request in case the document has not been modified.
      See Also:
    • REDIRECTION_PERMANENT

      public static final Status REDIRECTION_PERMANENT
      The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs.
      See Also:
    • REDIRECTION_SEE_OTHER

      public static final Status REDIRECTION_SEE_OTHER
      The response to the request can be found under a different URI and SHOULD be retrieved using a GET method on that resource.
      See Also:
    • REDIRECTION_TEMPORARY

      public static final Status REDIRECTION_TEMPORARY
      The requested resource resides temporarily under a different URI which should not be used for future requests by the client.
      See Also:
    • REDIRECTION_USE_PROXY

      public static final Status REDIRECTION_USE_PROXY
      The requested resource MUST be accessed through the proxy given by the Location field.
      See Also:
    • SERVER_ERROR_BAD_GATEWAY

      public static final Status SERVER_ERROR_BAD_GATEWAY
      The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.
      See Also:
    • SERVER_ERROR_GATEWAY_TIMEOUT

      public static final Status SERVER_ERROR_GATEWAY_TIMEOUT
      The server, while acting as a gateway or proxy, could not connect to the upstream server.
      See Also:
    • SERVER_ERROR_INTERNAL

      public static final Status SERVER_ERROR_INTERNAL
      The server encountered an unexpected condition which prevented it from fulfilling the request.
      See Also:
    • SERVER_ERROR_NOT_IMPLEMENTED

      public static final Status SERVER_ERROR_NOT_IMPLEMENTED
      The server does not support the functionality required to fulfill the request.
      See Also:
    • SERVER_ERROR_SERVICE_UNAVAILABLE

      public static final Status SERVER_ERROR_SERVICE_UNAVAILABLE
      The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
      See Also:
    • SERVER_ERROR_VERSION_NOT_SUPPORTED

      public static final Status SERVER_ERROR_VERSION_NOT_SUPPORTED
      The server does not support, or refuses to support, the HTTP protocol version that was used in the request message.
      See Also:
    • SUCCESS_ACCEPTED

      public static final Status SUCCESS_ACCEPTED
      The request has been accepted for processing, but the processing has not been completed.
      See Also:
    • SUCCESS_CREATED

      public static final Status SUCCESS_CREATED
      The request has been fulfilled and resulted in a new resource being created.
      See Also:
    • SUCCESS_MISC_PERSISTENT_WARNING

      public static final Status SUCCESS_MISC_PERSISTENT_WARNING
      Warning status code, optionally including arbitrary information to be presented to a human user, typically returned by a cache.
      See Also:
    • SUCCESS_NO_CONTENT

      public static final Status SUCCESS_NO_CONTENT
      The server has fulfilled the request but does not need to return an entity-body (for example after a DELETE), and might want to return updated meta-information.
      See Also:
    • SUCCESS_NON_AUTHORITATIVE

      public static final Status SUCCESS_NON_AUTHORITATIVE
      The request has succeeded but the returned meta-information in the entity-header does not come from the origin server, but is gathered from a local or a third-party copy.
      See Also:
    • SUCCESS_OK

      public static final Status SUCCESS_OK
      The request has succeeded.
      See Also:
    • SUCCESS_PARTIAL_CONTENT

      public static final Status SUCCESS_PARTIAL_CONTENT
      The server has fulfilled the partial GET request for the resource assuming the request has included a Range header field indicating the desired range.
      See Also:
    • SUCCESS_RESET_CONTENT

      public static final Status SUCCESS_RESET_CONTENT
      The server has fulfilled the request, and the user agent SHOULD reset the document view which caused the request to be sent.
      See Also:
    • SUCCESS_TRANSFORMATION_APPLIED

      public static final Status SUCCESS_TRANSFORMATION_APPLIED
      Warning status code, typically returned by a cache or a proxy, indicating that the response has been transformed.
      See Also:
  • Constructor Details

    • Status

      public Status(int code)
      Constructor.
      Parameters:
      code - The specification code.
    • Status

      public Status(int code, String reasonPhrase)
      Constructor.
      Parameters:
      code - The specification code.
      reasonPhrase - The short reason phrase displayed next to the status code in a HTTP response.
    • Status

      public Status(int code, String reasonPhrase, String description)
      Constructor.
      Parameters:
      code - The specification code.
      reasonPhrase - The short reason phrase displayed next to the status code in a HTTP response.
      description - The longer description.
    • Status

      public Status(int code, String reasonPhrase, String description, String uri)
      Constructor.
      Parameters:
      code - The specification code.
      reasonPhrase - The short reason phrase displayed next to the status code in a HTTP response.
      description - The longer description.
      uri - The URI of the specification describing the method.
    • Status

      public Status(int code, Throwable throwable)
      Constructor.
      Parameters:
      code - The specification code.
      throwable - The related error or exception.
    • Status

      public Status(int code, Throwable throwable, String reasonPhrase)
      Constructor.
      Parameters:
      code - The specification code.
      throwable - The related error or exception.
      reasonPhrase - The short reason phrase displayed next to the status code in a HTTP response.
    • Status

      public Status(int code, Throwable throwable, String reasonPhrase, String description)
      Constructor.
      Parameters:
      code - The specification code.
      throwable - The related error or exception.
      reasonPhrase - The short reason phrase displayed next to the status code in a HTTP response.
      description - The longer description.
    • Status

      public Status(int code, Throwable throwable, String reasonPhrase, String description, String uri)
      Constructor.
      Parameters:
      code - The specification code.
      throwable - The related error or exception.
      reasonPhrase - The short reason phrase displayed next to the status code in a HTTP response.
      description - The longer description.
      uri - The URI of the specification describing the method.
    • Status

      public Status(Status status, String description)
      Constructor.
      Parameters:
      status - The status to copy.
      description - The description to associate.
    • Status

      public Status(Status status, String reasonPhrase, String description)
      Constructor.
      Parameters:
      status - The status to copy.
      reasonPhrase - The short reason phrase displayed next to the status code in a HTTP response.
      description - The description to associate.
    • Status

      public Status(Status status, Throwable throwable)
      Constructor.
      Parameters:
      status - The status to copy.
      throwable - The related error or exception.
    • Status

      public Status(Status status, Throwable throwable, String reasonPhrase)
      Constructor.
      Parameters:
      status - The status to copy.
      throwable - The related error or exception.
      reasonPhrase - The short reason phrase displayed next to the status code in a HTTP response.
    • Status

      public Status(Status status, Throwable throwable, String reasonPhrase, String description)
      Constructor.
      Parameters:
      status - The status to copy.
      throwable - The related error or exception.
      reasonPhrase - The short reason phrase displayed next to the status code in a HTTP response.
      description - The description to associate.
  • Method Details

    • isClientError

      public static boolean isClientError(int code)
      Indicates if the status is a client error status, meaning "The request contains bad syntax or cannot be fulfilled".
      Parameters:
      code - The code of the status.
      Returns:
      True if the status is a client error status.
    • isConnectorError

      public static boolean isConnectorError(int code)
      Indicates if the status is a connector error status, meaning "The connector failed to send or receive an apparently valid message".
      Parameters:
      code - The code of the status.
      Returns:
      True if the status is a server error status.
    • isError

      public static boolean isError(int code)
      Indicates if the status is an error (client or server) status.
      Parameters:
      code - The code of the status.
      Returns:
      True if the status is an error (client or server) status.
    • isGlobalError

      public static boolean isGlobalError(int code)
      Indicates if the status is a client error status, meaning "The request contains bad syntax or cannot be fulfilled".
      Parameters:
      code - The code of the status.
      Returns:
      True if the status is a client error status.
    • isInformational

      public static boolean isInformational(int code)
      Indicates if the status is an information status, meaning "request received, continuing process".
      Parameters:
      code - The code of the status.
      Returns:
      True if the status is an information status.
    • isRedirection

      public static boolean isRedirection(int code)
      Indicates if the status is a redirection status, meaning "Further action must be taken in order to complete the request".
      Parameters:
      code - The code of the status.
      Returns:
      True if the status is a redirection status.
    • isServerError

      public static boolean isServerError(int code)
      Indicates if the status is a server error status, meaning "The server failed to fulfill an apparently valid request".
      Parameters:
      code - The code of the status.
      Returns:
      True if the status is a server error status.
    • isSuccess

      public static boolean isSuccess(int code)
      Indicates if the status is a success status, meaning "The action was successfully received, understood, and accepted".
      Parameters:
      code - The code of the status.
      Returns:
      True if the status is a success status.
    • valueOf

      public static Status valueOf(int code)
      Returns the status associated to a code. If an existing constant exists then it is returned, otherwise a new instance is created.
      Parameters:
      code - The code.
      Returns:
      The associated status.
    • equals

      public boolean equals(Object object)
      Indicates if the status is equal to a given one.
      Overrides:
      equals in class Object
      Parameters:
      object - The object to compare to.
      Returns:
      True if the status is equal to a given one.
    • getCode

      public int getCode()
      Returns the corresponding code (HTTP or custom code).
      Returns:
      The corresponding code.
    • getDescription

      public String getDescription()
      Returns the description. This value is typically used by the StatusService to build a meaningful description of an error via a response entity.
      Returns:
      The description.
    • getReasonPhrase

      public String getReasonPhrase()
      Returns the reason phrase of this status. When supported by the HTTP server connector, this is returned in the first line of the HTTP response, next to to the status code.
      Returns:
      The reason phrase of this status.
    • getThrowable

      public Throwable getThrowable()
      Returns the related error or exception.
      Returns:
      The related error or exception.
    • getUri

      public String getUri()
      Returns the URI of the specification describing the status.
      Returns:
      The URI of the specification describing the status.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isClientError

      public boolean isClientError()
      Indicates if the status is a client error status, meaning "The request contains bad syntax or cannot be fulfilled".
      Returns:
      True if the status is a client error status.
    • isConnectorError

      public boolean isConnectorError()
      Indicates if the status is a connector error status, meaning "The connector failed to send or receive an apparently valid message".
      Returns:
      True if the status is a connector error status.
    • isError

      public boolean isError()
      Indicates if the status is an error (client or server) status.
      Returns:
      True if the status is an error (client or server) status.
    • isGlobalError

      public boolean isGlobalError()
      Indicates if the status is a global error status, meaning "The server has definitive information about a particular user".
      Returns:
      True if the status is a global error status.
    • isInformational

      public boolean isInformational()
      Indicates if the status is an information status, meaning "request received, continuing process".
      Returns:
      True if the status is an information status.
    • isRecoverableError

      public boolean isRecoverableError()
      Indicates if an error is recoverable, meaning that simply retrying after a delay could result in a success. Tests isConnectorError() and if the status is CLIENT_ERROR_REQUEST_TIMEOUT or SERVER_ERROR_GATEWAY_TIMEOUT or SERVER_ERROR_SERVICE_UNAVAILABLE.
      Returns:
      True if the error is recoverable.
    • isRedirection

      public boolean isRedirection()
      Indicates if the status is a redirection status, meaning "Further action must be taken in order to complete the request".
      Returns:
      True if the status is a redirection status.
    • isServerError

      public boolean isServerError()
      Indicates if the status is a server error status, meaning "The server failed to fulfill an apparently valid request".
      Returns:
      True if the status is a server error status.
    • isSuccess

      public boolean isSuccess()
      Indicates if the status is a success status, meaning "The action was successfully received, understood, and accepted".
      Returns:
      True if the status is a success status.
    • toString

      public String toString()
      Returns the reason phrase of the status followed by its HTTP code.
      Overrides:
      toString in class Object
      Returns:
      The reason phrase of the status followed by its HTTP code.