Package org.bgerp.util
Class AntiSpam
java.lang.Object
org.bgerp.util.AntiSpam
Simple IP based anti-spam.
Prevents sequential requests from single IP address more often than some timeout.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
getWaitTimeout
(String ip) How many milliseconds wait until next request from the IP.
-
Constructor Details
-
AntiSpam
public AntiSpam(long timeout) Constructor.- Parameters:
timeout
- - timeout in milliseconds.
-
AntiSpam
Constructor.- Parameters:
timeout
-
-
-
Method Details
-
getWaitTimeout
How many milliseconds wait until next request from the IP.- Parameters:
ip
- IP address.- Returns:
-