java.lang.Object
com.maxmind.geoip2.model.AbstractResponse
com.maxmind.geoip2.model.DomainResponse
This class provides the GeoIP2 Domain model.
-
Constructor Summary
ConstructorDescriptionDomainResponse
(DomainResponse response, String ipAddress, Network network) Constructs an instance ofDomainResponse
with only required parameters.DomainResponse
(String domain, String ipAddress, Network network) Constructs an instance ofDomainResponse
. -
Method Summary
Methods inherited from class com.maxmind.geoip2.model.AbstractResponse
toJson, toString
-
Constructor Details
-
DomainResponse
Constructs an instance ofDomainResponse
.- Parameters:
domain
- the second level domain associated with the IP addressipAddress
- the IP address that the data in the model is fornetwork
- the network associated with the record
-
DomainResponse
Constructs an instance ofDomainResponse
with only required parameters.- Parameters:
response
- the responseipAddress
- the IP address that the data in the model is for.network
- the network associated with the record.
-
-
Method Details
-
getDomain
- Returns:
- The second level domain associated with the IP address. This will be something like "example.com" or "example.co.uk", not "foo.example.com".
-
getIpAddress
- Returns:
- The IP address that the data in the model is for.
-
getNetwork
- Returns:
- The network associated with the record. In particular, this is the largest network where all the fields besides IP address have the same value.
-