Class ThrottleResponse

java.lang.Object
org.apache.cxf.throttling.ThrottleResponse
Direct Known Subclasses:
SimpleThrottlingManager

public class ThrottleResponse extends Object
  • Field Details

    • delay

      protected long delay
    • responseHeaders

      protected Map<String,String> responseHeaders
    • responseCode

      protected int responseCode
    • errorMessage

      protected String errorMessage
  • Constructor Details

    • ThrottleResponse

      public ThrottleResponse()
    • ThrottleResponse

      public ThrottleResponse(int responceCode)
    • ThrottleResponse

      public ThrottleResponse(int responceCode, long delay)
  • Method Details

    • getResponseHeaders

      public Map<String,String> getResponseHeaders()
    • addResponseHeader

      public ThrottleResponse addResponseHeader(String header, String value)
      Add headers to the response. Typically, this would be things like X-RateLimit-Limit headers
      Returns:
    • getResponseCode

      public int getResponseCode()
    • getErrorMessage

      public String getErrorMessage()
    • setResponseCode

      public ThrottleResponse setResponseCode(int rc)
    • setResponseCode

      public ThrottleResponse setResponseCode(int rc, String msg)
    • getDelay

      public long getDelay()
      Delay processing for specified milliseconds. Should be "small" to prevent the client from timing out unless the client request is aborted with the HTTP error code.
      Returns:
    • setDelay

      public ThrottleResponse setDelay(long d)