Class Throttler.Action

  • Enclosing class:
    Throttler

    public static class Throttler.Action
    extends java.lang.Object
    Class used to track information about Action that might be throttled.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String ip  
      protected java.time.ZonedDateTime time  
      protected java.lang.String userId  
    • Constructor Summary

      Constructors 
      Constructor Description
      Action​(java.lang.String userId, javax.servlet.http.HttpServletRequest request)
      Build a new action from specified param.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getIp()
      Return the remote IP of the user who performed this action
      java.time.ZonedDateTime getTime()
      Return the time at which this action was performed
      java.lang.String getUserId()
      Return the id of the user who performed this Action
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • userId

        protected java.lang.String userId
      • ip

        protected java.lang.String ip
      • time

        protected java.time.ZonedDateTime time
    • Constructor Detail

      • Action

        public Action​(java.lang.String userId,
                      javax.servlet.http.HttpServletRequest request)
        Build a new action from specified param.
        Parameters:
        userId - a unique and constant identifier used to track the User/Member for which authentication failed
        request - the HttpServletRequest which triggered this action (optional but highly recommended)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getUserId

        public java.lang.String getUserId()
        Return the id of the user who performed this Action
        Returns:
        a unique and constant identifier used to track the User/Member for which authentication failed
      • getIp

        public java.lang.String getIp()
        Return the remote IP of the user who performed this action
        Returns:
        an IP (as returned by HttpServletRequest.getRemoteAddr()), might be null
      • getTime

        public java.time.ZonedDateTime getTime()
        Return the time at which this action was performed
        Returns:
        a ZoneDateTime