Enum Class ResponseSource

java.lang.Object
java.lang.Enum<ResponseSource>
org.microproxy.ResponseSource
All Implemented Interfaces:
Serializable, Comparable<ResponseSource>, Constable

public enum ResponseSource extends Enum<ResponseSource>
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.
  • Enum Constant Details

    • SERVER

      public static final ResponseSource 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 it FILTER.
    • PROXY

      public static final ResponseSource PROXY
      Made by the proxy: its answers to failures (including a FailureResponder's), the 407 authentication challenge and the 200 that opens a CONNECT tunnel.
    • FILTER

      public static final ResponseSource FILTER
      Made by a filter: a short-circuit response, an answer from HttpFilters.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

      public static final ResponseSource CACHE
      Answered by the HttpCache: a stored response (fresh, revalidated or stale while the server is unreachable), or the cache's own 504 for a request it may not forward (offline mode, only-if-cached).
    • REPLAY

      public static final ResponseSource REPLAY
      Answered from a recording by ServerReplay: a recorded response, or its answer to a request it has no recording for.
  • Method Details

    • values

      public static ResponseSource[] 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

      public static ResponseSource valueOf(String name)
      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 name
      NullPointerException - if the argument is null