Class Traits


public final class Traits extends AbstractRecord
Contains data for the traits record associated with an IP address.
  • Constructor Details

    • Traits

      public Traits()
      Constructs an instance of Traits.
    • Traits

      public Traits(String ipAddress, Network network)
      Constructs an instance of Traits.
      Parameters:
      ipAddress - the IP address
      network - the network
    • Traits

      public Traits(Long autonomousSystemNumber, String autonomousSystemOrganization, ConnectionTypeResponse.ConnectionType connectionType, String domain, String ipAddress, boolean isAnonymous, boolean isAnonymousProxy, boolean isAnonymousVpn, boolean isAnycast, boolean isHostingProvider, boolean isLegitimateProxy, boolean isPublicProxy, boolean isResidentialProxy, boolean isSatelliteProvider, boolean isTorExitNode, String isp, String mobileCountryCode, String mobileNetworkCode, Network network, String organization, String userType, Integer userCount, Double staticIpScore)
      Constructs an instance of Traits.
      Parameters:
      autonomousSystemNumber - the autonomous system number
      autonomousSystemOrganization - the autonomous system organization
      connectionType - the connection type
      domain - the domain
      ipAddress - the IP address
      isAnonymous - the anonymous flag
      isAnonymousProxy - the anonymous proxy flag
      isAnonymousVpn - the anonymous VPN flag
      isAnycast - the anycast flag
      isHostingProvider - the hosting provider flag
      isLegitimateProxy - the legitimate proxy flag
      isPublicProxy - the public proxy flag
      isResidentialProxy - the residential proxy flag
      isSatelliteProvider - the satellite provider flag
      isTorExitNode - the Tor exit node flag
      isp - the ISP
      mobileCountryCode - the mobile country code
      mobileNetworkCode - the mobile network code
      network - the network
      organization - the organization
      userType - the user type
      userCount - the user count
      staticIpScore - the static IP score
    • Traits

      public Traits(Long autonomousSystemNumber, String autonomousSystemOrganization, String connectionType, String domain, String ipAddress, Boolean isAnonymous, Boolean isAnonymousProxy, Boolean isAnonymousVpn, Boolean isAnycast, Boolean isHostingProvider, Boolean isLegitimateProxy, Boolean isPublicProxy, Boolean isResidentialProxy, Boolean isSatelliteProvider, Boolean isTorExitNode, String isp, String mobileCountryCode, String mobileNetworkCode, Network network, String organization, String userType, Integer userCount, Double staticIpScore)
      Constructs an instance of Traits.
      Parameters:
      autonomousSystemNumber - the autonomous system number
      autonomousSystemOrganization - the autonomous system organization
      connectionType - the connection type
      domain - the domain
      ipAddress - the IP address
      isAnonymous - the anonymous flag
      isAnonymousProxy - the anonymous proxy flag
      isAnonymousVpn - the anonymous VPN flag
      isAnycast - the anycast flag
      isHostingProvider - the hosting provider flag
      isLegitimateProxy - the legitimate proxy flag
      isPublicProxy - the public proxy flag
      isResidentialProxy - the residential proxy flag
      isSatelliteProvider - the satellite provider flag
      isTorExitNode - the Tor exit node flag
      isp - the ISP
      mobileCountryCode - the mobile country code
      mobileNetworkCode - the mobile network code
      network - the network
      organization - the organization
      userType - the user type
      userCount - the user count
      staticIpScore - the static IP score
    • Traits

      @Deprecated public Traits(Long autonomousSystemNumber, String autonomousSystemOrganization, ConnectionTypeResponse.ConnectionType connectionType, String domain, String ipAddress, boolean isAnonymous, boolean isAnonymousProxy, boolean isAnonymousVpn, boolean isHostingProvider, boolean isLegitimateProxy, boolean isPublicProxy, boolean isResidentialProxy, boolean isSatelliteProvider, boolean isTorExitNode, String isp, String mobileCountryCode, String mobileNetworkCode, Network network, String organization, String userType, Integer userCount, Double staticIpScore)
      Deprecated.
      will be removed in the next major version.
      Parameters:
      autonomousSystemNumber - the autonomous system number
      autonomousSystemOrganization - the autonomous system organization
      connectionType - the connection type
      domain - the domain
      ipAddress - the IP address
      isAnonymous - the anonymous flag
      isAnonymousProxy - the anonymous proxy flag
      isAnonymousVpn - the anonymous VPN flag
      isHostingProvider - the hosting provider flag
      isLegitimateProxy - the legitimate proxy flag
      isPublicProxy - the public proxy flag
      isResidentialProxy - the residential proxy flag
      isSatelliteProvider - the satellite provider flag
      isTorExitNode - the Tor exit node flag
      isp - the ISP
      mobileCountryCode - the mobile country code
      mobileNetworkCode - the mobile network code
      network - the network
      organization - the organization
      userType - the user type
      userCount - the user count
      staticIpScore - the static IP score
    • Traits

      @Deprecated public Traits(Long autonomousSystemNumber, String autonomousSystemOrganization, String connectionType, String domain, String ipAddress, Boolean isAnonymous, Boolean isAnonymousProxy, Boolean isAnonymousVpn, Boolean isHostingProvider, Boolean isLegitimateProxy, Boolean isPublicProxy, Boolean isResidentialProxy, Boolean isSatelliteProvider, Boolean isTorExitNode, String isp, String mobileCountryCode, String mobileNetworkCode, Network network, String organization, String userType, Integer userCount, Double staticIpScore)
      Deprecated.
      will be removed in the next major version.
      Parameters:
      autonomousSystemNumber - the autonomous system number
      autonomousSystemOrganization - the autonomous system organization
      connectionType - the connection type
      domain - the domain
      ipAddress - the IP address
      isAnonymous - the anonymous flag
      isAnonymousProxy - the anonymous proxy flag
      isAnonymousVpn - the anonymous VPN flag
      isHostingProvider - the hosting provider flag
      isLegitimateProxy - the legitimate proxy flag
      isPublicProxy - the public proxy flag
      isResidentialProxy - the residential proxy flag
      isSatelliteProvider - the satellite provider flag
      isTorExitNode - the Tor exit node flag
      isp - the ISP
      mobileCountryCode - the mobile country code
      mobileNetworkCode - the mobile network code
      network - the network
      organization - the organization
      userType - the user type
      userCount - the user count
      staticIpScore - the static IP score
    • Traits

      public Traits(Traits traits, String ipAddress, Network network)
      Constructs an instance of Traits.
      Parameters:
      traits - the traits
      ipAddress - the IP address
      network - the network
  • Method Details

    • getAutonomousSystemNumber

      public Long getAutonomousSystemNumber()
      Returns:
      The autonomous system number associated with the IP address. This is only available from the City Plus and Insights web services and the Enterprise database.
    • getAutonomousSystemOrganization

      public String getAutonomousSystemOrganization()
      Returns:
      The organization associated with the registered autonomous system number for the IP address. This is only available from the City Plus and Insights web services and the Enterprise database.
    • getConnectionType

      public ConnectionTypeResponse.ConnectionType getConnectionType()
      Returns:
      The connection type of the IP address. This is only available from the City Plus and Insights web services and the Enterprise database.
    • getStaticIpScore

      public Double getStaticIpScore()
      Returns:
      The static IP score of the IP address. This is an indicator of how static or dynamic an IP address is. This is only available from the Insights web service.
    • getUserCount

      public Integer getUserCount()
      Returns:
      The estimated number of users sharing the IP address/network during the past 24 hours. For IPv4, the count is for the individual IP address. For IPv6, the count is for the /64 network. This is only available from the Insights web service.
    • getDomain

      public String 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". This is only available from the City Plus and Insights web services and the Enterprise database.
    • getIpAddress

      public String getIpAddress()
      Returns:
      The IP address that the data in the model is for. If you performed a "me" lookup against the web service, this will be the externally routable IP address for the system the code is running on. If the system is behind a NAT, this may differ from the IP address locally assigned to it.
    • getIsp

      public String getIsp()
      Returns:
      The name of the ISP associated with the IP address. This is only available from the City Plus and Insights web services and the Enterprise database.
    • isAnonymous

      public boolean isAnonymous()
      Returns:
      This is true if the IP address belongs to any sort of anonymous network. This is only available from the Insights web service.
    • isAnonymousProxy

      @Deprecated public boolean isAnonymousProxy()
      Deprecated.
      Returns:
      This is true if the IP is an anonymous proxy.
    • isAnonymousVpn

      public boolean isAnonymousVpn()
      Returns:
      This is true if 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. This is only available from the Insights web service.
    • isAnycast

      public boolean isAnycast()
      Returns:
      This is true if the IP address belongs to an anycast network. This is not available from GeoLite databases or web services.
    • isHostingProvider

      public boolean isHostingProvider()
      Returns:
      This is true if the IP address belongs to a hosting or VPN provider (see description of isAnonymousVpn). This is only available from the Insights web service.
    • isLegitimateProxy

      public boolean isLegitimateProxy()
      Returns:
      This is true if MaxMind believes this IP address to be a legitimate proxy, such as an internal VPN used by a corporation. This is only available in the Enterprise database.
    • isPublicProxy

      public boolean isPublicProxy()
      Returns:
      This is true if the IP address belongs to a public proxy. This is only available from the Insights web service.
    • isResidentialProxy

      public boolean isResidentialProxy()
      Returns:
      This is true if the IP address is on a suspected anonymizing network and belongs to a residential ISP. This is only available from the Insights web service.
    • isSatelliteProvider

      @Deprecated public boolean isSatelliteProvider()
      Deprecated.
      Due to increased mobile usage, we have insufficient data to maintain this field.
      Returns:
      This is true if the IP belong to a satellite Internet provider.
    • isTorExitNode

      public boolean isTorExitNode()
      Returns:
      This is true if the IP address belongs to a Tor exit node. This is only available from the Insights web service.
    • getMobileCountryCode

      public String getMobileCountryCode()
      Returns:
      The mobile country code (MCC) associated with the IP address and ISP. This is available from the City Plus and Insights web services and the Enterprise database.
    • getMobileNetworkCode

      public String getMobileNetworkCode()
      Returns:
      The mobile network code (MNC) associated with the IP address and ISP. This is available from the City Plus and Insights web services and the Enterprise database.
    • 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.
    • getOrganization

      public String getOrganization()
      Returns:
      The name of the organization associated with the IP address. This is only available from the City Plus and Insights web services and the Enterprise database.
    • getUserType

      public String getUserType()
      Returns:

      The user type associated with the IP address. This can be one of the following values:

      • business
      • cafe
      • cellular
      • college
      • consumer_privacy_network
      • content_delivery_network
      • dialup
      • government
      • hosting
      • library
      • military
      • residential
      • router
      • school
      • search_engine_spider
      • traveler

      This is only available from the Insights web service and the Enterprise database.