August 2017
Beginner to intermediate
278 pages
6h 40m
English
The following classes will help us to identify if requests are coming from a fraudulent IP. We have used interface before implementing the class so that we can add more NoSQL databases or any fast lookup services. You can implement this service and add a lookup service by using HBase or any other fast key lookup service.
We are using InMemoryLookup and have just added the fraud IP range in the cache. Add the following code to your project:
public interface IIPScanner { boolean isFraudIP(String ipAddresses);}
CacheIPLookup is one implementation for the IIPScanner interface which does in-memory lookup.
import java.io.Serializable;import java.util.HashSet;import java.util.Set;public class CacheIPLookup implements IIPScanner, ...
Read now
Unlock full access