Package ai.platon.pulsar.common.browser
Class Fingerprint
-
- All Implemented Interfaces:
-
kotlin.Comparable
public final class Fingerprint implements Comparable<Fingerprint>
The browser fingerprint.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classFingerprint.Companion
-
Field Summary
Fields Modifier and Type Field Description private final BooleanisLoadedprivate final ProxyEntryproxyEntryprivate final BrowserTypebrowserTypeprivate URIproxyURIprivate StringuserAgentprivate final Map<String, WebsiteAccount>websiteAccountsprivate Stringsourcepublic final static Fingerprint.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description Fingerprint(BrowserType browserType, String proxyURI, String userAgent)Fingerprint(BrowserType browserType, ProxyEntry proxy, String userAgent)Fingerprint(BrowserType browserType, URI proxyURI, String userAgent, Map<String, WebsiteAccount> websiteAccounts, String source)
-
Method Summary
Modifier and Type Method Description final BooleanisLoaded()final ProxyEntrygetProxyEntry()final BrowserTypegetBrowserType()the browser type. final URIgetProxyURI()the proxy server URI. final UnitsetProxyURI(URI proxyURI)the proxy server URI. final StringgetUserAgent()the user agent of the browser. final UnitsetUserAgent(String userAgent)the user agent of the browser. final Map<String, WebsiteAccount>getWebsiteAccounts()final StringgetSource()the full path of the source file of the fingerprint. final UnitsetSource(String source)the full path of the source file of the fingerprint. final BooleanhasProxy()final UnitsetProxy(String protocol, String hostPort, String username, String password)Set the proxy server. final UnitsetProxy(ProxyEntry proxy)final UnitunsetProxy()IntegercompareTo(Fingerprint other)IntegerhashCode()Booleanequals(Object other)TODO: review the equality logic StringtoString()-
-
Constructor Detail
-
Fingerprint
Fingerprint(BrowserType browserType, String proxyURI, String userAgent)
-
Fingerprint
Fingerprint(BrowserType browserType, ProxyEntry proxy, String userAgent)
-
Fingerprint
Fingerprint(BrowserType browserType, URI proxyURI, String userAgent, Map<String, WebsiteAccount> websiteAccounts, String source)
-
-
Method Detail
-
getProxyEntry
final ProxyEntry getProxyEntry()
-
getBrowserType
final BrowserType getBrowserType()
the browser type.
-
getProxyURI
final URI getProxyURI()
the proxy server URI.
-
setProxyURI
final Unit setProxyURI(URI proxyURI)
the proxy server URI.
-
getUserAgent
final String getUserAgent()
the user agent of the browser.
-
setUserAgent
final Unit setUserAgent(String userAgent)
the user agent of the browser.
-
getWebsiteAccounts
final Map<String, WebsiteAccount> getWebsiteAccounts()
-
setProxy
final Unit setProxy(String protocol, String hostPort, String username, String password)
Set the proxy server.
- Parameters:
protocol- the protocol of the proxy server, e.g.hostPort- the host and port of the proxy server, e.g.
-
setProxy
final Unit setProxy(ProxyEntry proxy)
-
unsetProxy
final Unit unsetProxy()
-
compareTo
Integer compareTo(Fingerprint other)
-
-
-
-