Class Bucket4jThrottledRequestExecutor

  • All Implemented Interfaces:
    org.apereo.cas.throttle.ThrottledRequestExecutor

    public class Bucket4jThrottledRequestExecutor
    extends java.lang.Object
    implements org.apereo.cas.throttle.ThrottledRequestExecutor
    Since:
    6.0.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String HEADER_NAME_X_RATE_LIMIT_REMAINING
      Header value to indicate available tokens.
      static java.lang.String HEADER_NAME_X_RATE_LIMIT_RETRY_AFTER_SECONDS
      Header value to indicate available tokens once capacity is consumed..
      • Fields inherited from interface org.apereo.cas.throttle.ThrottledRequestExecutor

        DEFAULT_BEAN_NAME
    • Constructor Summary

      Constructors 
      Constructor Description
      Bucket4jThrottledRequestExecutor​(org.apereo.cas.configuration.model.support.throttle.Bucket4jThrottleProperties properties)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean throttle​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • HEADER_NAME_X_RATE_LIMIT_REMAINING

        public static final java.lang.String HEADER_NAME_X_RATE_LIMIT_REMAINING
        Header value to indicate available tokens.
        See Also:
        Constant Field Values
      • HEADER_NAME_X_RATE_LIMIT_RETRY_AFTER_SECONDS

        public static final java.lang.String HEADER_NAME_X_RATE_LIMIT_RETRY_AFTER_SECONDS
        Header value to indicate available tokens once capacity is consumed..
        See Also:
        Constant Field Values
    • Constructor Detail

      • Bucket4jThrottledRequestExecutor

        public Bucket4jThrottledRequestExecutor​(org.apereo.cas.configuration.model.support.throttle.Bucket4jThrottleProperties properties)
    • Method Detail

      • throttle

        public boolean throttle​(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response)
        Specified by:
        throttle in interface org.apereo.cas.throttle.ThrottledRequestExecutor