Package com.maxmind.geoip

Examples of com.maxmind.geoip.LookupService


        File f = new File("GeoLiteCity.dat");
        if (!f.exists()) {
            return;
        }
       
        geoipLookup = new LookupService(f);
    }
View Full Code Here


                LOGGER.warning("GeoIP database " + path  + " is not available. " +
                    "Please install the file to enable GeoIP lookups.");
                return null;
            }
           
            return new LookupService(f);
        }
        catch (IOException e) {
            LOGGER.log(Level.WARNING, "Error occured looking up GeoIP database", e);
            return null;
        }
View Full Code Here

     * @param filename Basename of the GeoIP Database file.  Should be located in your home dir in HDFS
     * @throws IOException
     */
    public GeoIpLookup(String filename) throws IOException {
        lookupFilename = filename;
        lookupService = new LookupService(lookupFilename);
    }
View Full Code Here

        File f = new File("GeoLiteCity.dat");
        if (!f.exists()) {
            return;
        }
       
        geoipLookup = new LookupService(f);
    }
View Full Code Here

   
    LookupService lookupGeoIPDatabase() {
        try {
            File f = loader.find("monitoring", "GeoLiteCity.dat");
            if (f != null) {
                return new LookupService(f);
            }
           
            if (!warned.get()) {
                warned.set(true);
               
View Full Code Here

TOP

Related Classes of com.maxmind.geoip.LookupService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.