java.lang.Object
com.maxmind.geoip2.record.AbstractRecord
com.maxmind.geoip2.record.Traits
Contains data for the traits record associated with an IP address.
-
Constructor Summary
ConstructorDescriptionTraits()
Constructs an instance ofTraits
.Constructs an instance ofTraits
.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 ofTraits
.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.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 ofTraits
.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.Constructs an instance ofTraits
. -
Method Summary
Modifier and TypeMethodDescriptiongetIsp()
boolean
boolean
Deprecated.Use our GeoIP2 Anonymous IP database instead.boolean
boolean
boolean
boolean
boolean
boolean
boolean
Deprecated.Due to increased mobile usage, we have insufficient data to maintain this field.boolean
Methods inherited from class com.maxmind.geoip2.record.AbstractRecord
toJson, toString
-
Constructor Details
-
Traits
public Traits()Constructs an instance ofTraits
. -
Traits
Constructs an instance ofTraits
.- Parameters:
ipAddress
- the IP addressnetwork
- 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 ofTraits
.- Parameters:
autonomousSystemNumber
- the autonomous system numberautonomousSystemOrganization
- the autonomous system organizationconnectionType
- the connection typedomain
- the domainipAddress
- the IP addressisAnonymous
- the anonymous flagisAnonymousProxy
- the anonymous proxy flagisAnonymousVpn
- the anonymous VPN flagisAnycast
- the anycast flagisHostingProvider
- the hosting provider flagisLegitimateProxy
- the legitimate proxy flagisPublicProxy
- the public proxy flagisResidentialProxy
- the residential proxy flagisSatelliteProvider
- the satellite provider flagisTorExitNode
- the Tor exit node flagisp
- the ISPmobileCountryCode
- the mobile country codemobileNetworkCode
- the mobile network codenetwork
- the networkorganization
- the organizationuserType
- the user typeuserCount
- the user countstaticIpScore
- 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 ofTraits
.- Parameters:
autonomousSystemNumber
- the autonomous system numberautonomousSystemOrganization
- the autonomous system organizationconnectionType
- the connection typedomain
- the domainipAddress
- the IP addressisAnonymous
- the anonymous flagisAnonymousProxy
- the anonymous proxy flagisAnonymousVpn
- the anonymous VPN flagisAnycast
- the anycast flagisHostingProvider
- the hosting provider flagisLegitimateProxy
- the legitimate proxy flagisPublicProxy
- the public proxy flagisResidentialProxy
- the residential proxy flagisSatelliteProvider
- the satellite provider flagisTorExitNode
- the Tor exit node flagisp
- the ISPmobileCountryCode
- the mobile country codemobileNetworkCode
- the mobile network codenetwork
- the networkorganization
- the organizationuserType
- the user typeuserCount
- the user countstaticIpScore
- 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 numberautonomousSystemOrganization
- the autonomous system organizationconnectionType
- the connection typedomain
- the domainipAddress
- the IP addressisAnonymous
- the anonymous flagisAnonymousProxy
- the anonymous proxy flagisAnonymousVpn
- the anonymous VPN flagisHostingProvider
- the hosting provider flagisLegitimateProxy
- the legitimate proxy flagisPublicProxy
- the public proxy flagisResidentialProxy
- the residential proxy flagisSatelliteProvider
- the satellite provider flagisTorExitNode
- the Tor exit node flagisp
- the ISPmobileCountryCode
- the mobile country codemobileNetworkCode
- the mobile network codenetwork
- the networkorganization
- the organizationuserType
- the user typeuserCount
- the user countstaticIpScore
- 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 numberautonomousSystemOrganization
- the autonomous system organizationconnectionType
- the connection typedomain
- the domainipAddress
- the IP addressisAnonymous
- the anonymous flagisAnonymousProxy
- the anonymous proxy flagisAnonymousVpn
- the anonymous VPN flagisHostingProvider
- the hosting provider flagisLegitimateProxy
- the legitimate proxy flagisPublicProxy
- the public proxy flagisResidentialProxy
- the residential proxy flagisSatelliteProvider
- the satellite provider flagisTorExitNode
- the Tor exit node flagisp
- the ISPmobileCountryCode
- the mobile country codemobileNetworkCode
- the mobile network codenetwork
- the networkorganization
- the organizationuserType
- the user typeuserCount
- the user countstaticIpScore
- the static IP score
-
Traits
Constructs an instance ofTraits
.- Parameters:
traits
- the traitsipAddress
- the IP addressnetwork
- the network
-
-
Method Details
-
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
- 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
- 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
- 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
- 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
- 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
- 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
- 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.Use our GeoIP2 Anonymous IP database instead.- 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.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
- 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
- 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
- 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
- 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
- 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.
-