Class Decorator<T extends DecoratorInformation>
- java.lang.Object
-
- technology.dice.dicewhere.decorator.Decorator<T>
-
- Direct Known Subclasses:
VpnDecorator
public abstract class Decorator<T extends DecoratorInformation> extends Object
Decorator is used to enrich IpInformation objects based on the data from the DecoratorDbReader. Example: adding VPN information to IpInformation based on a DB different from the one used to identify the location of the targeted IP
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<IpInformation>decorate(IpInformation original)Decorate the IpInformation with entries matching it's range from the Decorator's provided databases;
-
-
-
Method Detail
-
decorate
public Stream<IpInformation> decorate(IpInformation original) throws UnknownHostException
Decorate the IpInformation with entries matching it's range from the Decorator's provided databases;- Parameters:
original- the original IpInformation range- Returns:
- Stream of decorated IpInformation. It will split the original range into the matches and decorate each resulting range with IpInformation accordingly
- Throws:
UnknownHostException- if for some reason an IP operation fails because the IP isn't valid
-
-