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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()ipInfoASN(InetAddress ipAddress) ipInfoStandardLocation(InetAddress ipAddress) com.maxmind.geoip2.model.AsnResponsemaxMindASN(InetAddress ipAddress) com.maxmind.geoip2.model.CityResponsemaxMindCity(InetAddress ipAddress) com.maxmind.geoip2.model.CountryResponsemaxMindCountry(InetAddress ipAddress)
-
Constructor Details
-
IPinfoIPLocationDatabaseAdapter
- Throws:
IOException
-
-
Method Details
-
ipInfoStandardLocation
public IPinfoStandardLocation ipInfoStandardLocation(InetAddress ipAddress) throws IOException, com.maxmind.geoip2.exception.AddressNotFoundException - Specified by:
ipInfoStandardLocationin interfaceIPLocationDatabaseAdapter- Throws:
IOExceptioncom.maxmind.geoip2.exception.AddressNotFoundException
-
ipInfoASN
public IPinfoASN ipInfoASN(InetAddress ipAddress) throws IOException, com.maxmind.geoip2.exception.AddressNotFoundException - Specified by:
ipInfoASNin interfaceIPLocationDatabaseAdapter- Throws:
IOExceptioncom.maxmind.geoip2.exception.AddressNotFoundException
-
maxMindASN
public com.maxmind.geoip2.model.AsnResponse maxMindASN(InetAddress ipAddress) throws IOException, com.maxmind.geoip2.exception.GeoIp2Exception - Specified by:
maxMindASNin interfaceIPLocationDatabaseAdapter- Throws:
IOExceptioncom.maxmind.geoip2.exception.GeoIp2Exception
-
maxMindCountry
public com.maxmind.geoip2.model.CountryResponse maxMindCountry(InetAddress ipAddress) throws IOException, com.maxmind.geoip2.exception.GeoIp2Exception - Specified by:
maxMindCountryin interfaceIPLocationDatabaseAdapter- Throws:
IOExceptioncom.maxmind.geoip2.exception.GeoIp2Exception
-
maxMindCity
public com.maxmind.geoip2.model.CityResponse maxMindCity(InetAddress ipAddress) throws IOException, com.maxmind.geoip2.exception.GeoIp2Exception - Specified by:
maxMindCityin interfaceIPLocationDatabaseAdapter- Throws:
IOExceptioncom.maxmind.geoip2.exception.GeoIp2Exception
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-