cfboom.http

Class HttpStatus

lucee.Component
    extended by cfboom.lang.Object
      extended by cfboom.http.HttpStatus

Enumeration of HTTP status codes.

The HTTP status code series can be retrieved via {@link #series()}.

Class Attributes:
  • output : false
  •  
  • displayname : Enum HttpStatus
  •  
  • synchronized : false
  •  
  • see : List of HTTP status codes - Wikipedia
  •  
  • accessors : false
  •  
  • persistent : false
  •  
  • author : Brian Clozel
  •  
    Constructor Summary
    init(numeric value, string name, string reasonPhrase)
          Internally used during HttpStatus.
    Method Summary
    HttpStatus enum()
    string getReasonPhrase()
         Return the reason phrase of this status code.
    boolean is1xxInformational()
         Whether this status code is in the HTTP series.
    boolean is2xxSuccessful()
         Whether this status code is in the HTTP series.
    boolean is3xxRedirection()
         Whether this status code is in the HTTP series.
    boolean is4xxClientError()
         Whether this status code is in the HTTP series.
    boolean is5xxServerError()
         Whether this status code is in the HTTP series.
    string name()
         Return the value name of this status code.
    string toString()
    numeric value()
         Return the integer value of this status code.
    HttpStatus valueOf(numeric statusCode)
         Return the enum constant of this type with the specified numeric value.
    struct values()
         Return the enum values.
     
    Methods inherited from class cfboom.lang.Object
    $equals, getComponentName, getIdentityHashCode, getIdentityString, getMeta, hashCode
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init(numeric value, string name, string reasonPhrase)

    Internally used during HttpStatus.enum().

    Parameters:
    value
    name
    reasonPhrase

    Method Detail

    enum

    public HttpStatus enum()


    getReasonPhrase

    public string getReasonPhrase()

    Return the reason phrase of this status code.


    is1xxInformational

    public boolean is1xxInformational()

    Whether this status code is in the HTTP series {@link org.springframework.http.HttpStatus.Series#INFORMATIONAL}. This is a shortcut for checking the value of {@link #series()}.


    is2xxSuccessful

    public boolean is2xxSuccessful()

    Whether this status code is in the HTTP series {@link org.springframework.http.HttpStatus.Series#SUCCESSFUL}. This is a shortcut for checking the value of {@link #series()}.


    is3xxRedirection

    public boolean is3xxRedirection()

    Whether this status code is in the HTTP series {@link org.springframework.http.HttpStatus.Series#REDIRECTION}. This is a shortcut for checking the value of {@link #series()}.


    is4xxClientError

    public boolean is4xxClientError()

    Whether this status code is in the HTTP series {@link org.springframework.http.HttpStatus.Series#CLIENT_ERROR}. This is a shortcut for checking the value of {@link #series()}.


    is5xxServerError

    public boolean is5xxServerError()

    Whether this status code is in the HTTP series {@link org.springframework.http.HttpStatus.Series#SERVER_ERROR}. This is a shortcut for checking the value of {@link #series()}.


    name

    public string name()

    Return the value name of this status code.


    toString

    public string toString()

    Overrides:
    toString in class cfboom.lang.Object

    value

    public numeric value()

    Return the integer value of this status code.


    valueOf

    public HttpStatus valueOf(numeric statusCode)

    Return the enum constant of this type with the specified numeric value.

    Parameters:
    statusCode
    Returns:
    the enum constant with the specified numeric value

    values

    public struct values()

    Return the enum values.