public class AntiSpam
extends Object
Simple IP based anti-spam.
Prevents sequential requests from single IP address more often than some timeout.
-
Constructor Summary 
Constructors
-
Method Summary 
long
How many milliseconds wait until next request from the IP.
Methods inherited from class java.lang.Object 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details 
-
AntiSpam 
public AntiSpam(long timeout)
Constructor.
- Parameters:
timeout
- - timeout in milliseconds.
-
AntiSpam 
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: