Class Traits


  • public final class Traits
    extends AbstractRecord

    Contains data for the traits record associated with an IP address.

    This record is returned by all the end points.

    • Method Detail

      • getAutonomousSystemNumber

        public Integer getAutonomousSystemNumber()
        Returns:
        The autonomous system number associated with the IP address. This attribute is only available from the City and Insights web service end points and the GeoIP2 Enterprise database.
      • getAutonomousSystemOrganization

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

        public ConnectionTypeResponse.ConnectionType getConnectionType()
        Returns:
        The connection type of the IP address. This attribute is only available in the GeoIP2 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 attribute is only available from GeoIP2 Precision Insights.
      • 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 attribute is only available from GeoIP2 Precision Insights.
      • 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 attribute is only available from the City and Insights web service end points and the GeoIP2 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. This attribute is returned by all end points.
      • getIsp

        public String getIsp()
        Returns:
        The name of the ISP associated with the IP address. This attribute is only available from the City and Insights web service end points and the GeoIP2 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 GeoIP2 Precision Insights.
      • 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 GeoIP2 Precision Insights.
      • 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 GeoIP2 Precision Insights.
      • 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 GeoIP2 Enterprise database.
      • isPublicProxy

        public boolean isPublicProxy()
        Returns:
        This is true if the IP address belongs to a public proxy. This is only available from GeoIP2 Precision Insights.
      • 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 attribute is only available from GeoIP2 Precision Insights.
      • 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. This attribute is returned by all end points.
      • isTorExitNode

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

        public Network getNetwork()
        Returns:
        The network associated with the record. In particular, this is the largest network where all of 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 attribute is only available from the City and Insights web service end points and the GeoIP2 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
        • content_delivery_network
        • dialup
        • government
        • hosting
        • library
        • military
        • residential
        • router
        • school
        • search_engine_spider
        • traveler

        This attribute is only available from the Insights end point and the GeoIP2 Enterprise database.