Package edu.rit.http

Enum Class HttpResponse.Status

java.lang.Object
java.lang.Enum<HttpResponse.Status>
edu.rit.http.HttpResponse.Status
All Implemented Interfaces:
Serializable, Comparable<HttpResponse.Status>, Constable
Enclosing class:
HttpResponse

public static enum HttpResponse.Status extends Enum<HttpResponse.Status>
Enumeration HttpResponse.Status enumerates the status codes for an HTTP response message.
Version:
10-Oct-2006
Author:
Alan Kaminsky
  • Enum Constant Details

    • STATUS_200_OK

      public static final HttpResponse.Status STATUS_200_OK
      The request has succeeded.
    • STATUS_201_CREATED

      public static final HttpResponse.Status STATUS_201_CREATED
      The request has been fulfilled and resulted in a new resource being created.
    • STATUS_202_ACCEPTED

      public static final HttpResponse.Status STATUS_202_ACCEPTED
      The request has been accepted for processing, but the processing has not been completed.
    • STATUS_204_NO_CONTENT

      public static final HttpResponse.Status STATUS_204_NO_CONTENT
      The server has fulfilled the request but there is no new information to send back.
    • STATUS_301_MOVED_PERMANENTLY

      public static final HttpResponse.Status STATUS_301_MOVED_PERMANENTLY
      The requested resource has been assigned a new permanent URL and any future references to this resource should be done using that URL.
    • STATUS_302_MOVED_TEMPORARILY

      public static final HttpResponse.Status STATUS_302_MOVED_TEMPORARILY
      The requested resource resides temporarily under a different URL.
    • STATUS_304_NOT_MODIFIED

      public static final HttpResponse.Status STATUS_304_NOT_MODIFIED
      If the client has performed a conditional GET request and access is allowed, but the document has not been modified since the date and time specified in the If-Modified-Since field, the server must respond with this status code and not send an Entity-Body to the client.
    • STATUS_400_BAD_REQUEST

      public static final HttpResponse.Status STATUS_400_BAD_REQUEST
      The request could not be understood by the server due to malformed syntax.
    • STATUS_401_UNAUTHORIZED

      public static final HttpResponse.Status STATUS_401_UNAUTHORIZED
      The request requires user authentication.
    • STATUS_403_FORBIDDEN

      public static final HttpResponse.Status STATUS_403_FORBIDDEN
      The server understood the request, but is refusing to fulfill it.
    • STATUS_404_NOT_FOUND

      public static final HttpResponse.Status STATUS_404_NOT_FOUND
      The server has not found anything matching the Request-URI.
    • STATUS_500_INTERNAL_SERVER_ERROR

      public static final HttpResponse.Status STATUS_500_INTERNAL_SERVER_ERROR
      The server encountered an unexpected condition which prevented it from fulfilling the request.
    • STATUS_501_NOT_IMPLEMENTED

      public static final HttpResponse.Status STATUS_501_NOT_IMPLEMENTED
      The server does not support the functionality required to fulfill the request.
    • STATUS_502_BAD_GATEWAY

      public static final HttpResponse.Status STATUS_502_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.
    • STATUS_503_SERVICE_UNAVAILABLE

      public static final HttpResponse.Status STATUS_503_SERVICE_UNAVAILABLE
      The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
  • Method Details

    • values

      public static HttpResponse.Status[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static HttpResponse.Status valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Returns a string version of this Status value.
      Overrides:
      toString in class Enum<HttpResponse.Status>
      Returns:
      String version.