Interface GeoIpService

All Known Implementing Classes:
MaxmindGeoIp, NoOpGeoIp

public interface GeoIpService
Service for getting GeoIP details.
  • Method Summary

    Modifier and Type
    Method
    Description
    default GeoIpDetails
    getDetails(String ipAddress)
    Gets the GeoIP details for a given IP address.
    getDetails(String ipAddress, boolean permitFallback)
    Gets the GeoIP details for a given IP address.
  • Method Details

    • getDetails

      @Nullable GeoIpDetails getDetails(String ipAddress, boolean permitFallback)
      Gets the GeoIP details for a given IP address.
      Parameters:
      ipAddress - The IP address.
      permitFallback - Whether to permit fallback to a default location if the IP address is not found.
      Returns:
      The GeoIP details, or null if not found and fallback is not permitted.
    • getDetails

      default GeoIpDetails getDetails(String ipAddress)
      Gets the GeoIP details for a given IP address.
      Parameters:
      ipAddress - The IP address.
      Returns:
      The GeoIP details, or null if not found.