Package com.iizix.geo
Class RegionLocation.Security
- java.lang.Object
- com.iizix.geo.RegionLocation.Security
- Enclosing class:
- RegionLocation
public static class RegionLocation.Security extends java.lang.ObjectClass containing security-related data.
Constructor Summary
Constructors Constructor Description Security(java.lang.Boolean isProxy, java.lang.String proxyType, java.lang.Boolean isCrawler, java.lang.String crawlerName, java.lang.String crawlerType, java.lang.Boolean isTor, int threatLevel, java.lang.String... threatTypes)Creates a new security instance from the specified values.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Returns if another object equals this one.java.lang.StringgetCrawlerName()Gets the name of the crawler the IP is associated with.java.lang.StringgetCrawlerType()Returns the type of crawler, null for unknown.java.lang.BooleangetIsCrawler()Returns the flag indicating whether or not the given IP is associated with a crawler, null for unknown.java.lang.BooleangetIsProxy()Returns the flag indicating whether or not the given IP is associated with a proxy, null for unknown.java.lang.BooleangetIsTor()Returns the flag indicating whether or not the given IP is associated with the anonymous Tor system, null for unknown.java.lang.StringgetProxyType()Returns the type of proxy, null for unknown.intgetThreatLevel()Returns the threat level: 0=unknown, 1=low risk, 2=medium risk, 3=high risk.java.lang.String[]getThreatTypes()Returns an array of the names of threat types, empty array if unknown.inthashCode()Returns the hash code of this instance.java.lang.StringtoString()String representation of the security as "[isProxy,proxyType,isCrawler,crawlerName,crawlerType,isTor,threatLevel,threatTypes=[...]]" where the null values are omitted.
Constructor Detail
Security
public Security(java.lang.Boolean isProxy, java.lang.String proxyType, java.lang.Boolean isCrawler, java.lang.String crawlerName, java.lang.String crawlerType, java.lang.Boolean isTor, int threatLevel, java.lang.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:
java.lang.IllegalArgumentException- If thethreatLevelrange is not 0 to 3.
Method Detail
getIsProxy
public java.lang.Boolean getIsProxy()
Returns the flag indicating whether or not the given IP is associated with a proxy, null for unknown.- Returns:
- The proxy flag.
getProxyType
public java.lang.String 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
public java.lang.Boolean getIsCrawler()
Returns the flag indicating whether or not the given IP is associated with a crawler, null for unknown.- Returns:
- The crawler flag.
getCrawlerName
public java.lang.String 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
public java.lang.String 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
public java.lang.Boolean 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
public java.lang.String[] 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.- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hash code.
equals
public boolean equals(java.lang.Object obj)
Returns if another object equals this one.- Overrides:
equalsin classjava.lang.Object- Returns:
- The equality flag.
toString
public java.lang.String toString()
String representation of the security as "[isProxy,proxyType,isCrawler,crawlerName,crawlerType,isTor,threatLevel,threatTypes=[...]]" where the null values are omitted.- Overrides:
toStringin classjava.lang.Object- Returns:
- The string representation.