public enum ResponseCode extends Enum<ResponseCode>
Enum Constant and Description |
---|
HTTP_200_OK |
HTTP_400_BAD_REQUEST |
HTTP_500_INTERNAL_SERVER_ERROR |
Modifier and Type | Method and Description |
---|---|
static ResponseCode |
detect(String theRawMessage)
Detects the appropriate HTTP response code for a given message
|
static ResponseCode |
forAcknowledgementCode(String theAcknowledgementCode)
Returns the appropriate response code for a given ACK code.
|
int |
getCode() |
String |
getMessage() |
void |
setCode(int theCode) |
void |
setMessage(String theMessage) |
static ResponseCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ResponseCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ResponseCode HTTP_200_OK
public static final ResponseCode HTTP_400_BAD_REQUEST
public static final ResponseCode HTTP_500_INTERNAL_SERVER_ERROR
public static ResponseCode[] values()
for (ResponseCode c : ResponseCode.values()) System.out.println(c);
public static ResponseCode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static ResponseCode forAcknowledgementCode(String theAcknowledgementCode)
HTTP_500_INTERNAL_SERVER_ERROR
theAcknowledgementCode
- The acknowledgement code, e.g. "AA", or "CE"public static ResponseCode detect(String theRawMessage)
public int getCode()
public void setCode(int theCode)
theCode
- the code to setpublic String getMessage()
public void setMessage(String theMessage)
theMessage
- the message to setCopyright © 2012–2017 University Health Network. All rights reserved.