Package com.iizix.geo
Class RegionLocation.Security
java.lang.Object
com.iizix.geo.RegionLocation.Security
- Enclosing class:
- RegionLocation
Class containing security-related data.
Constructor Summary
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns if another object equals this one.Gets the name of the crawler the IP is associated with.Returns the type of crawler, null for unknown.Returns the flag indicating whether or not the given IP is associated with a crawler, null for unknown.Returns the flag indicating whether or not the given IP is associated with a proxy, null for unknown.getIsTor()
Returns the flag indicating whether or not the given IP is associated with the anonymous Tor system, null for unknown.Returns the type of proxy, null for unknown.int
Returns the threat level: 0=unknown, 1=low risk, 2=medium risk, 3=high risk.String[]
Returns an array of the names of threat types, empty array if unknown.int
hashCode()
Returns the hash code of this instance.toString()
String representation of the security as "[isProxy,proxyType,isCrawler,crawlerName,crawlerType,isTor,threatLevel,threatTypes=[...]]" where the null values are omitted.
Constructor Details
Security
public Security(Boolean isProxy, String proxyType, Boolean isCrawler, String crawlerName, String crawlerType, Boolean isTor, int threatLevel, String... threatTypes) Creates a new security instance from the specified values.- Parameters:
isProxy
- Flag indicating whether or not the given IP is associated with a proxy, null for unknown.proxyType
- Type of proxy, e.g. 'cgi', 'vpn' or 'web', null for unknown.isCrawler
- Flag indicating whether or not the given IP is associated with a crawler, null for unknown.crawlerName
- The name of the crawler the IP is associated with.crawlerType
- The type of crawler, null for unknown.isTor
- Flag indicating whether or not the given IP is associated with the anonymous Tor system, null for unknown.threatLevel
- Threat level: 0=unknown, 1=low risk, 2=medium risk, 3=high risk.threatTypes
- List of threat types, none if unknown.- Throws:
IllegalArgumentException
- If thethreatLevel
range is not 0 to 3.
Method Details
getIsProxy
Returns the flag indicating whether or not the given IP is associated with a proxy, null for unknown.- Returns:
- The proxy flag.
getProxyType
Returns the type of proxy, null for unknown.Some value could be:
- cgi - CGI Proxy,
- vpn - VPN Proxy,
- web - Web Proxy.
- Returns:
- The proxy type string.
getIsCrawler
Returns the flag indicating whether or not the given IP is associated with a crawler, null for unknown.- Returns:
- The crawler flag.
getCrawlerName
Gets the name of the crawler the IP is associated with.- Returns:
- The crawler name, or null if this information is not available.
getCrawlerType
Returns the type of crawler, null for unknown.Some crawler types:
- unrecognized - Unrecognized,
- search_engine_bot - Search engine bot,
- site_monitor - Site monitor,
- screenshot_creator - Screenshot creator,
- link_checker - Link checker,
- wearable_computer - Wearable computer,
- web_scraper - Web scraper,
- vulnerability_scanner - Vulnerability scanner,
- virus_scanner - Virus scanner,
- speed_tester - Speed tester,
- feed_fetcher - Feed Fetcher,
- tool - Tool,
- marketing - Marketing.
- Returns:
- The crawler type string.
getIsTor
Returns the flag indicating whether or not the given IP is associated with the anonymous Tor system, null for unknown.- Returns:
- The Tor flag.
getThreatLevel
public int getThreatLevel()Returns the threat level: 0=unknown, 1=low risk, 2=medium risk, 3=high risk.- Returns:
- The threat level.
getThreatTypes
Returns an array of the names of threat types, empty array if unknown.Some threat types:
- tor - Tor System
- fake_crawler - Fake Crawler
- web_scraper - Web Scraper
- attack_source - Attack Source identified: HTTP
- attack_source_http - Attack Source identified: HTTP
- attack_source_mail - Attack Source identified: Mail
- attack_source_ssh - Attack Source identified: SSH
- Returns:
- The threat types.
hashCode
public int hashCode()Returns the hash code of this instance.equals
Returns if another object equals this one.toString
String representation of the security as "[isProxy,proxyType,isCrawler,crawlerName,crawlerType,isTor,threatLevel,threatTypes=[...]]" where the null values are omitted.