javax.ws.rs.core
Enum Response.Status

java.lang.Object
  extended by java.lang.Enum<Response.Status>
      extended by javax.ws.rs.core.Response.Status
All Implemented Interfaces:
Serializable, Comparable<Response.Status>, Response.StatusType
Enclosing class:
Response

public static enum Response.Status
extends Enum<Response.Status>
implements Response.StatusType


Nested Class Summary
static class Response.Status.Family
           
 
Enum Constant Summary
ACCEPTED
           
BAD_REQUEST
           
CONFLICT
           
CREATED
           
FORBIDDEN
           
GONE
           
INTERNAL_SERVER_ERROR
           
MOVED_PERMANENTLY
           
NO_CONTENT
           
NOT_ACCEPTABLE
           
NOT_FOUND
           
NOT_MODIFIED
           
OK
           
PRECONDITION_FAILED
           
SEE_OTHER
           
SERVICE_UNAVAILABLE
           
TEMPORARY_REDIRECT
           
UNAUTHORIZED
           
UNSUPPORTED_MEDIA_TYPE
           
 
Method Summary
static Response.Status fromStatusCode(int statusCode)
           
 Response.Status.Family getFamily()
           
 String getReasonPhrase()
           
 int getStatusCode()
           
 String toString()
           
static Response.Status valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Response.Status[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

OK

public static final Response.Status OK

CREATED

public static final Response.Status CREATED

ACCEPTED

public static final Response.Status ACCEPTED

NO_CONTENT

public static final Response.Status NO_CONTENT

MOVED_PERMANENTLY

public static final Response.Status MOVED_PERMANENTLY

SEE_OTHER

public static final Response.Status SEE_OTHER

NOT_MODIFIED

public static final Response.Status NOT_MODIFIED

TEMPORARY_REDIRECT

public static final Response.Status TEMPORARY_REDIRECT

BAD_REQUEST

public static final Response.Status BAD_REQUEST

UNAUTHORIZED

public static final Response.Status UNAUTHORIZED

FORBIDDEN

public static final Response.Status FORBIDDEN

NOT_FOUND

public static final Response.Status NOT_FOUND

NOT_ACCEPTABLE

public static final Response.Status NOT_ACCEPTABLE

CONFLICT

public static final Response.Status CONFLICT

GONE

public static final Response.Status GONE

PRECONDITION_FAILED

public static final Response.Status PRECONDITION_FAILED

UNSUPPORTED_MEDIA_TYPE

public static final Response.Status UNSUPPORTED_MEDIA_TYPE

INTERNAL_SERVER_ERROR

public static final Response.Status INTERNAL_SERVER_ERROR

SERVICE_UNAVAILABLE

public static final Response.Status SERVICE_UNAVAILABLE
Method Detail

values

public static Response.Status[] 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 (Response.Status c : Response.Status.values())
    System.out.println(c);

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

valueOf

public static Response.Status 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

fromStatusCode

public static Response.Status fromStatusCode(int statusCode)

getStatusCode

public int getStatusCode()
Specified by:
getStatusCode in interface Response.StatusType

getFamily

public Response.Status.Family getFamily()
Specified by:
getFamily in interface Response.StatusType

toString

public String toString()
Overrides:
toString in class Enum<Response.Status>

getReasonPhrase

public String getReasonPhrase()
Specified by:
getReasonPhrase in interface Response.StatusType


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.