Interface Geolocator
-
- All Known Implementing Classes:
GeoLite2Geolocator
public interface Geolocator
Interface for different Geolocation service calls.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.Optional<java.lang.String>
getCountry(java.lang.String address)
java.util.Optional<java.lang.String>
getCountry(java.net.InetAddress inetAddress)
void
prepare()
Do everything that is needed for the geolocator to function.
-
-
-
Method Detail
-
prepare
void prepare() throws java.io.IOException
Do everything that is needed for the geolocator to function.- Throws:
java.io.IOException
- If the preparation failsjava.net.UnknownHostException
- If preparation requires internet, but internet is not available.PreparationException
- If preparation fails due to Plan settings
-
getCountry
java.util.Optional<java.lang.String> getCountry(java.net.InetAddress inetAddress)
-
getCountry
default java.util.Optional<java.lang.String> getCountry(java.lang.String address)
-
-