Package org.graylog.plugins.map.geoip
Class IPinfoIPLocationDatabaseAdapter
java.lang.Object
org.graylog.plugins.map.geoip.IPinfoIPLocationDatabaseAdapter
- All Implemented Interfaces:
Closeable
,AutoCloseable
,IPLocationDatabaseAdapter
Custom
Reader
wrapper to be able to support IPinfo database files. The IPinfo databases use a different
database type identifier and a different data format than the MaxMind databases.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
ipInfoASN
(InetAddress ipAddress) ipInfoStandardLocation
(InetAddress ipAddress) com.maxmind.geoip2.model.AsnResponse
maxMindASN
(InetAddress ipAddress) com.maxmind.geoip2.model.CityResponse
maxMindCity
(InetAddress ipAddress) com.maxmind.geoip2.model.CountryResponse
maxMindCountry
(InetAddress ipAddress)
-
Constructor Details
-
IPinfoIPLocationDatabaseAdapter
- Throws:
IOException
-
-
Method Details
-
ipInfoStandardLocation
public IPinfoStandardLocation ipInfoStandardLocation(InetAddress ipAddress) throws IOException, com.maxmind.geoip2.exception.AddressNotFoundException - Specified by:
ipInfoStandardLocation
in interfaceIPLocationDatabaseAdapter
- Throws:
IOException
com.maxmind.geoip2.exception.AddressNotFoundException
-
ipInfoASN
public IPinfoASN ipInfoASN(InetAddress ipAddress) throws IOException, com.maxmind.geoip2.exception.AddressNotFoundException - Specified by:
ipInfoASN
in interfaceIPLocationDatabaseAdapter
- Throws:
IOException
com.maxmind.geoip2.exception.AddressNotFoundException
-
maxMindASN
public com.maxmind.geoip2.model.AsnResponse maxMindASN(InetAddress ipAddress) throws IOException, com.maxmind.geoip2.exception.GeoIp2Exception - Specified by:
maxMindASN
in interfaceIPLocationDatabaseAdapter
- Throws:
IOException
com.maxmind.geoip2.exception.GeoIp2Exception
-
maxMindCountry
public com.maxmind.geoip2.model.CountryResponse maxMindCountry(InetAddress ipAddress) throws IOException, com.maxmind.geoip2.exception.GeoIp2Exception - Specified by:
maxMindCountry
in interfaceIPLocationDatabaseAdapter
- Throws:
IOException
com.maxmind.geoip2.exception.GeoIp2Exception
-
maxMindCity
public com.maxmind.geoip2.model.CityResponse maxMindCity(InetAddress ipAddress) throws IOException, com.maxmind.geoip2.exception.GeoIp2Exception - Specified by:
maxMindCity
in interfaceIPLocationDatabaseAdapter
- Throws:
IOException
com.maxmind.geoip2.exception.GeoIp2Exception
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-