net.craftforge.essential.controller.constants
Enum HttpStatusCode

java.lang.Object
  extended by java.lang.Enum<HttpStatusCode>
      extended by net.craftforge.essential.controller.constants.HttpStatusCode
All Implemented Interfaces:
Serializable, Comparable<HttpStatusCode>

public enum HttpStatusCode
extends Enum<HttpStatusCode>

HTTP status codes with name.

Since:
20.06.11
Author:
Christian Bick

Enum Constant Summary
Accepted
           
BadGateway
           
BadRequest
           
BandwidthLimitExceeded
           
Conflict
           
Continue
           
Created
           
ExpectationFailed
           
FailedDependency
           
Forbidden
           
Found
           
GatewayTimeOut
           
Gone
           
HTTPVersionNotSupported
           
InsufficientStorage
           
InternalServerError
           
LengthRequired
           
Locked
           
MethodNotAllowed
           
MovedPermanently
           
MultipleChoice
           
MultiStatus
           
NoContent
           
NonAuthoritativeInformation
           
NotAcceptable
           
NotExtended
           
NotFound
           
NotImplemented
           
NotModified
           
OK
           
PartialContent
           
PreconditionFailed
           
Processing
           
ProxyAuthenticationRequired
           
RequestedRangeNotSatisfiable
           
RequestEntityTooLarge
           
RequestTimeOut
           
RequestURITooLong
           
ResetContent
           
SeeOther
           
ServiceUnavailable
           
SwitchingProtocols
           
TemporaryRedirect
           
ThereAreToManyConnectionsFromYourInternetAddress
           
Unauthorized
           
UnorderedCollection
           
UnprocessableEntity
           
UnsupportedMediaType
           
UpgradeRequired
           
UseProxy
           
VariantAlsoNegotiates
           
 
Method Summary
 int getCode()
          Gets the status code.
 HttpStatusCode getHttpStatusCode(int code)
          Gets the HTTP status code enum for the given status code.
 String getName()
          Gets the status name.
static HttpStatusCode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static HttpStatusCode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Continue

public static final HttpStatusCode Continue

SwitchingProtocols

public static final HttpStatusCode SwitchingProtocols

Processing

public static final HttpStatusCode Processing

OK

public static final HttpStatusCode OK

Created

public static final HttpStatusCode Created

Accepted

public static final HttpStatusCode Accepted

NonAuthoritativeInformation

public static final HttpStatusCode NonAuthoritativeInformation

NoContent

public static final HttpStatusCode NoContent

ResetContent

public static final HttpStatusCode ResetContent

PartialContent

public static final HttpStatusCode PartialContent

MultiStatus

public static final HttpStatusCode MultiStatus

MultipleChoice

public static final HttpStatusCode MultipleChoice

MovedPermanently

public static final HttpStatusCode MovedPermanently

Found

public static final HttpStatusCode Found

SeeOther

public static final HttpStatusCode SeeOther

NotModified

public static final HttpStatusCode NotModified

UseProxy

public static final HttpStatusCode UseProxy

TemporaryRedirect

public static final HttpStatusCode TemporaryRedirect

BadRequest

public static final HttpStatusCode BadRequest

Unauthorized

public static final HttpStatusCode Unauthorized

Forbidden

public static final HttpStatusCode Forbidden

NotFound

public static final HttpStatusCode NotFound

MethodNotAllowed

public static final HttpStatusCode MethodNotAllowed

NotAcceptable

public static final HttpStatusCode NotAcceptable

ProxyAuthenticationRequired

public static final HttpStatusCode ProxyAuthenticationRequired

RequestTimeOut

public static final HttpStatusCode RequestTimeOut

Conflict

public static final HttpStatusCode Conflict

Gone

public static final HttpStatusCode Gone

LengthRequired

public static final HttpStatusCode LengthRequired

PreconditionFailed

public static final HttpStatusCode PreconditionFailed

RequestEntityTooLarge

public static final HttpStatusCode RequestEntityTooLarge

RequestURITooLong

public static final HttpStatusCode RequestURITooLong

UnsupportedMediaType

public static final HttpStatusCode UnsupportedMediaType

RequestedRangeNotSatisfiable

public static final HttpStatusCode RequestedRangeNotSatisfiable

ExpectationFailed

public static final HttpStatusCode ExpectationFailed

ThereAreToManyConnectionsFromYourInternetAddress

public static final HttpStatusCode ThereAreToManyConnectionsFromYourInternetAddress

UnprocessableEntity

public static final HttpStatusCode UnprocessableEntity

Locked

public static final HttpStatusCode Locked

FailedDependency

public static final HttpStatusCode FailedDependency

UnorderedCollection

public static final HttpStatusCode UnorderedCollection

UpgradeRequired

public static final HttpStatusCode UpgradeRequired

InternalServerError

public static final HttpStatusCode InternalServerError

NotImplemented

public static final HttpStatusCode NotImplemented

BadGateway

public static final HttpStatusCode BadGateway

ServiceUnavailable

public static final HttpStatusCode ServiceUnavailable

GatewayTimeOut

public static final HttpStatusCode GatewayTimeOut

HTTPVersionNotSupported

public static final HttpStatusCode HTTPVersionNotSupported

VariantAlsoNegotiates

public static final HttpStatusCode VariantAlsoNegotiates

InsufficientStorage

public static final HttpStatusCode InsufficientStorage

BandwidthLimitExceeded

public static final HttpStatusCode BandwidthLimitExceeded

NotExtended

public static final HttpStatusCode NotExtended
Method Detail

values

public static HttpStatusCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (HttpStatusCode c : HttpStatusCode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static HttpStatusCode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - if the argument is null

getCode

public int getCode()
Gets the status code.

Returns:
The status code

getName

public String getName()
Gets the status name.

Returns:
The status name

getHttpStatusCode

public HttpStatusCode getHttpStatusCode(int code)
Gets the HTTP status code enum for the given status code.

Parameters:
code - The status code
Returns:
The status code enum


Copyright © 2011. All Rights Reserved.