Package com.maxmind.geoip

Examples of com.maxmind.geoip.Location


    public void testLookup() throws Exception {
        if (geoipLookup == null) {
            return;
        }
       
        Location loc = geoipLookup.getLocation("64.147.114.82");
        assertEquals("United States", loc.countryName);
        assertEquals("New York", loc.city);
       
        loc = geoipLookup.getLocation("192.168.1.103");
        assertNull(loc);
View Full Code Here


       
        if (geoIPLookup == null) {
            return;
        }
       
        Location loc = geoIPLookup.getLocation(data.getRemoteAddr());
        if (loc == null) {
            LOGGER.fine("Unable to obtain location for " + data.getRemoteAddr());
            return;
        }
       
View Full Code Here

TOP

Related Classes of com.maxmind.geoip.Location

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.