Class GeoLite2Geolocator
- java.lang.Object
-
- com.djrapitops.plan.gathering.geolocation.GeoLite2Geolocator
-
- All Implemented Interfaces:
Geolocator
@Singleton public class GeoLite2Geolocator extends java.lang.Object implements Geolocator
Geolocator
implementation for MaxMind GeoLite2 database.This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com.
- See Also:
- http://maxmind.com
-
-
Constructor Summary
Constructors Constructor Description GeoLite2Geolocator(PlanFiles files, PlanConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.lang.String>
getCountry(java.net.InetAddress inetAddress)
void
prepare()
Do everything that is needed for the geolocator to function.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.djrapitops.plan.gathering.geolocation.Geolocator
getCountry
-
-
-
-
Constructor Detail
-
GeoLite2Geolocator
@Inject public GeoLite2Geolocator(PlanFiles files, PlanConfig config)
-
-
Method Detail
-
prepare
public void prepare() throws java.io.IOException
Description copied from interface:Geolocator
Do everything that is needed for the geolocator to function.- Specified by:
prepare
in interfaceGeolocator
- Throws:
java.io.IOException
- If the preparation failsjava.net.UnknownHostException
- If preparation requires internet, but internet is not available.
-
getCountry
public java.util.Optional<java.lang.String> getCountry(java.net.InetAddress inetAddress)
- Specified by:
getCountry
in interfaceGeolocator
-
-