Package org.microproxy
Enum Class ResponseSource
- All Implemented Interfaces:
Serializable,Comparable<ResponseSource>,Constable
Where a response sent to the client came from; see
ActivityTracker.responseSentToClient(FlowContext, HttpResponse, ResponseSource). Together with
FlowContext.upstreamStatus() it tells server errors from the proxy's own.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAnswered by theHttpCache: a stored response (fresh, revalidated or stale while the server is unreachable), or the cache's own504for a request it may not forward (offline mode,only-if-cached).Made by a filter: a short-circuit response, an answer fromHttpFilters.proxyToServerFailure(org.microproxy.ProxyFailure), or a replacement for the server's or the proxy's response (another response object, or the same one with a different status).Made by the proxy: its answers to failures (including aFailureResponder's), the407authentication challenge and the200that opens aCONNECTtunnel.Answered from a recording byServerReplay: a recorded response, or its answer to a request it has no recording for.The server's response, relayed. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResponseSourceReturns the enum constant of this class with the specified name.static ResponseSource[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SERVER
The server's response, relayed. Filters may have changed its headers or body in place; one that changes its status, or returns another response object, makes itFILTER. -
PROXY
Made by the proxy: its answers to failures (including aFailureResponder's), the407authentication challenge and the200that opens aCONNECTtunnel. -
FILTER
Made by a filter: a short-circuit response, an answer fromHttpFilters.proxyToServerFailure(org.microproxy.ProxyFailure), or a replacement for the server's or the proxy's response (another response object, or the same one with a different status). -
CACHE
Answered by theHttpCache: a stored response (fresh, revalidated or stale while the server is unreachable), or the cache's own504for a request it may not forward (offline mode,only-if-cached). -
REPLAY
Answered from a recording byServerReplay: a recorded response, or its answer to a request it has no recording for.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-