Class AsnResponse

java.lang.Object
com.maxmind.geoip2.model.AbstractResponse
com.maxmind.geoip2.model.AsnResponse
Direct Known Subclasses:
IspResponse

public class AsnResponse extends AbstractResponse
This class provides the GeoLite2 ASN model.
  • Constructor Details

    • AsnResponse

      public AsnResponse(Long autonomousSystemNumber, String autonomousSystemOrganization, String ipAddress, Network network)
      Constructs an instance of AsnResponse with the specified values for all fields.
      Parameters:
      autonomousSystemNumber - the autonomous system number associated with the IP address
      autonomousSystemOrganization - the organization associated with the registered autonomous system number for the IP address
      ipAddress - the IP address that the data in the model is for
      network - the network associated with the record
    • AsnResponse

      public AsnResponse(AsnResponse response, String ipAddress, Network network)
      Constructs an instance of AsnResponse with only the specified values set.
      Parameters:
      response - The AsnResponse 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

      public Long getAutonomousSystemNumber()
      Returns:
      The autonomous system number associated with the IP address.
    • getAutonomousSystemOrganization

      public String getAutonomousSystemOrganization()
      Returns:
      The organization associated with the registered autonomous system number for the IP address
    • getIpAddress

      public String getIpAddress()
      Returns:
      The IP address that the data in the model is for.
    • getNetwork

      public Network 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.