Class ThrottleResponse

    • Field Detail

      • delay

        protected long delay
      • responseCode

        protected int responseCode
      • errorMessage

        protected String errorMessage
    • Constructor Detail

      • ThrottleResponse

        public ThrottleResponse()
      • ThrottleResponse

        public ThrottleResponse​(int responceCode)
      • ThrottleResponse

        public ThrottleResponse​(int responceCode,
                                long delay)
    • Method Detail

      • 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()
      • 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: