public enum RoboResponseSource extends Enum<RoboResponseSource>
Where the HTTP client should look for a response.
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 RoboResponseSource |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RoboResponseSource[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RoboResponseSource CACHE
public static final RoboResponseSource CONDITIONAL_CACHE
public static final RoboResponseSource NETWORK
public static RoboResponseSource[] values()
for (RoboResponseSource c : RoboResponseSource.values()) System.out.println(c);
public static RoboResponseSource 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()