Class IpBaseResponse

java.lang.Object
com.maxmind.geoip2.model.AbstractResponse
com.maxmind.geoip2.model.IpBaseResponse
Direct Known Subclasses:
AnonymousIpResponse, IpRiskResponse

public class IpBaseResponse extends AbstractResponse
This class provides the base IP model.
  • Constructor Details

    • IpBaseResponse

      public IpBaseResponse(String ipAddress, boolean isAnonymous, boolean isAnonymousVpn, boolean isHostingProvider, boolean isPublicProxy, boolean isResidentialProxy, boolean isTorExitNode, Network network)
      Constructs an instance of IpBaseResponse.
      Parameters:
      ipAddress - the IP address that the data in the model is for
      isAnonymous - whether the IP address belongs to any sort of anonymous network
      isAnonymousVpn - whether the IP address belongs to an anonymous VPN system
      isHostingProvider - whether the IP address belongs to a hosting provider
      isPublicProxy - whether the IP address belongs to a public proxy system
      isResidentialProxy - whether the IP address belongs to a residential proxy system
      isTorExitNode - whether the IP address is a Tor exit node
      network - the network associated with the record
  • Method Details

    • isAnonymous

      public boolean isAnonymous()
      Returns:
      whether the IP address belongs to any sort of anonymous network.
    • isAnonymousVpn

      public boolean isAnonymousVpn()
      Returns:
      whether the IP address is registered to an anonymous VPN provider. If a VPN provider does not register subnets under names associated with them, we will likely only flag their IP ranges using isHostingProvider.
    • isHostingProvider

      public boolean isHostingProvider()
      Returns:
      whether the IP address belongs to a hosting or VPN provider (see description of isAnonymousVpn).
    • isPublicProxy

      public boolean isPublicProxy()
      Returns:
      whether the IP address belongs to a public proxy.
    • isResidentialProxy

      public boolean isResidentialProxy()
      Returns:
      whether the IP address is on a suspected anonymizing network and belongs to a residential ISP.
    • isTorExitNode

      public boolean isTorExitNode()
      Returns:
      whether the IP address is a Tor exit node.
    • 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.