public final class AdviceWarning extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DISCONNECTED_OPERATION
112 Disconnected operation SHOULD be included if the cache is intentionally
disconnected from the rest of the network for a period of time.
|
static int |
HEURISTIC_EXPIRATION
113 Heuristic expiration MUST be included if the cache heuristically chose a
freshness lifetime greater than 24 hours and the response's age is greater than 24 hours.
|
static int |
MISCELLANEOUS_PERSISTENT_WARNING
299 Miscellaneous persistent warning The warning text MAY include arbitrary information to
be presented to a human user, or logged.
|
static int |
MISCELLANEOUS_WARNING
199 Miscellaneous warning The warning text MAY include arbitrary information to be
presented to a human user, or logged.
|
static int |
NOT_PRESENT
100 Indicates that there is data missing from the request.
|
static int |
RESPONSE_STALE
110 Response is stale MUST be included whenever the returned response is stale.
|
static int |
REVALIDATION_FAILED
111 Revalidation failed MUST be included if a cache returns a stale response because
an attempt to revalidate the response failed, due to an inability to reach the server.
|
static int |
TRANFORMATION_APPLIED
214 Transformation applied MUST be added by an intermediate cache or proxy if it applies
any transformation changing the content-coding (as specified in the Content-Encoding header)
or media-type (as specified in the Content-Type header) of the response, or the entity-body
of the response, unless this Warning code already appears in the response.
|
Modifier and Type | Method and Description |
---|---|
static AdviceWarning |
getNotPresent(String agentName,
String missingKey)
Convenience method to quickly generate frequently-used error type: 100.
|
static AdviceWarning |
newAdviceWarning(String agentName,
String fmt,
Object... args)
Generate a warning using the builder provided.
|
String |
toString() |
public static final int NOT_PRESENT
public static final int RESPONSE_STALE
public static final int REVALIDATION_FAILED
public static final int DISCONNECTED_OPERATION
public static final int HEURISTIC_EXPIRATION
public static final int MISCELLANEOUS_WARNING
public static final int TRANFORMATION_APPLIED
public static final int MISCELLANEOUS_PERSISTENT_WARNING
public static AdviceWarning getNotPresent(String agentName, String missingKey)
agentName
- Name of the component responsible for issuing the warning.missingKey
- Name of the missing key which must be included.public static AdviceWarning newAdviceWarning(String agentName, String fmt, Object... args)
agentName
- the agent namefmt
- The format, which may include embedded %s, etc.args
- Zero or more args, passed into String.format to generate the warning textCopyright © 2010-2018, ForgeRock All Rights Reserved.