Package com.iizix.geo

Class RegionLocation.Security

java.lang.Object
com.iizix.geo.RegionLocation.Security
Enclosing class:
RegionLocation

public static class RegionLocation.Security extends Object
Class containing security-related data.
  • Constructor Summary

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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.
    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.
    Returns an array of the names of threat types, empty array if unknown.
    int
    Returns the hash code of this instance.
    String representation of the security as "[isProxy,proxyType,isCrawler,crawlerName,crawlerType,isTor,threatLevel,threatTypes=[...]]" where the null values are omitted.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 the threatLevel range is not 0 to 3.
  • Method Details

    • getIsProxy

      public 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 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 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 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 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 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 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:
      hashCode in class Object
      Returns:
      The hash code.
    • equals

      public boolean equals(Object obj)
      Returns if another object equals this one.
      Overrides:
      equals in class Object
      Returns:
      The equality flag.
    • toString

      public String toString()
      String representation of the security as "[isProxy,proxyType,isCrawler,crawlerName,crawlerType,isTor,threatLevel,threatTypes=[...]]" where the null values are omitted.
      Overrides:
      toString in class Object
      Returns:
      The string representation.