Package com.maxmind.geoip

Examples of com.maxmind.geoip.Location


            {
                doc1.addField("topdomain", dnsValue.substring(lastIndexOf));
            }
        }

        Location location = getLocationService().getLocation(ip);
        if (location != null
                && !("--".equals(location.countryCode)
                        && location.latitude == -180 && location.longitude == -180))
        {
View Full Code Here


        // Set both api and apiKeyId fields to zero since this location is not coming from a connector
        locationFacet.api = 0;
        locationFacet.apiKeyId = 0L;

        Location ipLocation = null;
        try {
        ipLocation = geoIpLookupService.getLocation(ipAddress);
        } catch (Throwable t) {
            StringBuilder sb = new StringBuilder("module=web component=guestServiceImpl action=checkIn")
                    .append(" guestId=").append(guestId).append(" message=" + t.getMessage());
View Full Code Here

                log.debug(e.getMessage(),e);
        }
           
            // Save the location information if valid, save the event without
            // location information if not valid
            Location location = locationService.getLocation(ip);
            if (location != null
                    && !("--".equals(location.countryCode)
                            && location.latitude == -180 && location.longitude == -180))
            {
                try
View Full Code Here

    @Override
    public String exec(Tuple input) throws IOException {
        if (input.size() > 0) {
            String ipaddr = (String)input.get(0);
            Location location = cl.getLocation(ipaddr);

            if (location == null)
                return null;

            return location.city;
View Full Code Here

    @Override
    public String exec(Tuple input) throws IOException {
        if (input.size() > 0) {
            String ipaddr = (String)input.get(0);
            Location location = cl.getLocation(ipaddr);

            if (location == null)
                return null;

            return location.latitude + " " + location.longitude;
View Full Code Here

   
    Object val = lru.get(ip);
    if(val != null)
      return (Map<String, Object>)val;
   
    Location loc = maxmind.getLocation(ip);
    if(loc == null)
    {
      lru.put(ip, UNKNOWN_GEO);
      return UNKNOWN_GEO;
    }
View Full Code Here

                    searchengines++;
                    continue;
                }

                // Get the geo information for the user
                Location location;
                try {
                    location = geoipLookup.getLocation(ip);
                    city = location.city;
                    country = location.countryName;
                    countryCode = location.countryCode;
View Full Code Here

        ip += getRandomNumberInRange(0, 254);
        if (j != 3)
          ip += ".";
      }
      // 2 Depending on our ip get all the location info
      Location location;
      try {
        location = cl.getLocation(ip);
      } catch (Exception e) {
        location = null;
      }
View Full Code Here

                log.debug(e.getMessage(), e);
            }

            // Save the location information if valid, save the event without
            // location information if not valid
            Location location = locationService.getLocation(ip);
            if (location != null
                    && !("--".equals(location.countryCode)
                    && location.latitude == -180 && location.longitude == -180)) {
                try {
                    docBuilder.field("continent", LocationUtils
View Full Code Here

                log.debug(e.getMessage(), e);
            }

            // Save the location information if valid, save the event without
            // location information if not valid
            Location location = locationService.getLocation(ip);
            if (location != null
                    && !("--".equals(location.countryCode)
                    && location.latitude == -180 && location.longitude == -180)) {
                try {
                    docBuilder.field("continent", LocationUtils
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.