public enum ResponseSource extends Enum<ResponseSource>
Enum Constant and Description |
---|
CACHE
Return the response from the cache immediately.
|
CONDITIONAL_CACHE
Make a conditional request to the host, returning the cache response if
the cache is valid and the network response otherwise.
|
NETWORK
Return the response from the network.
|
Modifier and Type | Method and Description |
---|---|
boolean |
requiresConnection() |
static ResponseSource |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ResponseSource[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ResponseSource CACHE
public static final ResponseSource CONDITIONAL_CACHE
public static final ResponseSource NETWORK
public static ResponseSource[] values()
for (ResponseSource c : ResponseSource.values()) System.out.println(c);
public static ResponseSource 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 requiresConnection()