java.lang.Object
com.maxmind.geoip2.model.AbstractResponse
com.maxmind.geoip2.model.AsnResponse
- Direct Known Subclasses:
IspResponse
This class provides the GeoLite2 ASN model.
-
Constructor Summary
ConstructorDescriptionAsnResponse
(AsnResponse response, String ipAddress, Network network) Constructs an instance ofAsnResponse
with only the specified values set.AsnResponse
(Long autonomousSystemNumber, String autonomousSystemOrganization, String ipAddress, Network network) Constructs an instance ofAsnResponse
with the specified values for all fields. -
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class com.maxmind.geoip2.model.AbstractResponse
toJson, toString
-
Constructor Details
-
AsnResponse
public AsnResponse(Long autonomousSystemNumber, String autonomousSystemOrganization, String ipAddress, Network network) Constructs an instance ofAsnResponse
with the specified values for all fields.- Parameters:
autonomousSystemNumber
- the autonomous system number associated with the IP addressautonomousSystemOrganization
- the organization associated with the registered autonomous system number for the IP addressipAddress
- the IP address that the data in the model is fornetwork
- the network associated with the record
-
AsnResponse
Constructs an instance ofAsnResponse
with only the specified values set.- Parameters:
response
- TheAsnResponse
object to copy.ipAddress
- The IP address that the data in the model is for.network
- The network associated with the record.
-
-
Method Details
-
getAutonomousSystemNumber
- Returns:
- The autonomous system number associated with the IP address.
-
getAutonomousSystemOrganization
- Returns:
- The organization associated with the registered autonomous system number for the IP address
-
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.
-