public enum StatusCode extends Enum<StatusCode>
Enum Constant and Description |
---|
BAD_REQUEST |
BUSY_EVERYWHERE |
BUSY_HERE |
DECLINED |
FORBIDDEN |
OK |
PROXYAUTH_REQUIRED |
REQUEST_PENDING |
REQUEST_TERMINATED |
REQUEST_TIMEOUT |
RESOURCE_UNAVAILABLE |
RINGING |
SERVER_ERROR |
SESSION_PROGRESS |
TEMPORARILY_UNAVAILABLE |
UNAUTHORIZED |
UNKNOWN |
WEBSOCKET_ERROR |
Modifier and Type | Method and Description |
---|---|
static StatusCode |
getByCode(int code)
Get StatusCode by value.
|
int |
getCode()
Gets the code.
|
static StatusCode |
getStatusCode(oracle.wsc.android.data.Frame frame)
Extract the frame status code to
StatusCode enum. |
boolean |
isClientError()
Checks if the code indicates a client error (4xx).
|
boolean |
isGlobalError()
Checks if the code indicates a global error (6xx).
|
boolean |
isProvisional()
Checks if the code is provisional (1xx).
|
boolean |
isRedirect()
Checks if the code indicates redirect (3xx).
|
boolean |
isServerError()
Checks if the code indicates a server error (5xx).
|
boolean |
isSuccess()
Checks if the code indicates success (2xx).
|
static StatusCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StatusCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StatusCode RINGING
public static final StatusCode SESSION_PROGRESS
public static final StatusCode OK
public static final StatusCode BAD_REQUEST
public static final StatusCode UNAUTHORIZED
public static final StatusCode FORBIDDEN
public static final StatusCode RESOURCE_UNAVAILABLE
public static final StatusCode PROXYAUTH_REQUIRED
public static final StatusCode REQUEST_TIMEOUT
public static final StatusCode TEMPORARILY_UNAVAILABLE
public static final StatusCode BUSY_HERE
public static final StatusCode REQUEST_TERMINATED
public static final StatusCode REQUEST_PENDING
public static final StatusCode SERVER_ERROR
public static final StatusCode WEBSOCKET_ERROR
public static final StatusCode BUSY_EVERYWHERE
public static final StatusCode DECLINED
public static final StatusCode UNKNOWN
public static StatusCode[] values()
for (StatusCode c : StatusCode.values()) System.out.println(c);
public static StatusCode 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 boolean isProvisional()
public boolean isSuccess()
public boolean isRedirect()
public boolean isClientError()
public boolean isServerError()
public boolean isGlobalError()
public int getCode()
public static StatusCode getByCode(int code)
code
- status code valuepublic static StatusCode getStatusCode(oracle.wsc.android.data.Frame frame)
StatusCode
enum.frame
- JSON Frame