Class AntiSpam

java.lang.Object
org.bgerp.util.AntiSpam

public class AntiSpam extends Object
Simple IP based anti-spam. Prevents sequential requests from single IP address more often than some timeout.
  • Constructor Details

    • AntiSpam

      public AntiSpam(long timeout)
      Constructor.
      Parameters:
      timeout - - timeout in milliseconds.
    • AntiSpam

      public AntiSpam(Duration timeout)
      Constructor.
      Parameters:
      timeout -
  • Method Details

    • getWaitTimeout

      public long getWaitTimeout(String ip)
      How many milliseconds wait until next request from the IP.
      Parameters:
      ip - IP address.
      Returns: