Class Decorator<T extends DecoratorInformation>

  • 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 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