Class PrivacyManagedBrowserFetcher
-
- All Implemented Interfaces:
-
ai.platon.pulsar.protocol.browser.emulator.IncognitoBrowserFetcher,ai.platon.pulsar.skeleton.workflow.fetch.Fetcher,ai.platon.pulsar.skeleton.workflow.fetch.driver.BrowserFetcher,java.lang.AutoCloseable
public class PrivacyManagedBrowserFetcher extends AbstractBrowserFetcher implements IncognitoBrowserFetcher
Created by Vincent on 18-1-1. Copyright @ 2013-2023 Platon AI. All rights reserved
-
-
Field Summary
Fields Modifier and Type Field Description private final <Error class: unknown class>webdriverFetcherprivate final BooleanisActiveprivate final BrowserManagerbrowserManagerprivate final BrowserPrivacyManagerprivacyManagerprivate final BrowserEmulatorbrowserEmulatorprivate final ImmutableConfigconf
-
Constructor Summary
Constructors Constructor Description PrivacyManagedBrowserFetcher(BrowserManager browserManager, BrowserPrivacyManager privacyManager, BrowserEmulator browserEmulator, ImmutableConfig conf, Boolean closeCascaded)
-
Method Summary
Modifier and Type Method Description <Error class: unknown class>getWebdriverFetcher()BooleanisActive()final BrowserManagergetBrowserManager()BrowserPrivacyManagergetPrivacyManager()BrowserEmulatorgetBrowserEmulator()ImmutableConfiggetConf()ResponsefetchContentDeferred(WebPage page)Fetch page content final ResponsefetchDeferred(FetchTask task)Fetches the content of a web page asynchronously using the provided fetch task. Unitreset()Unitcancel(WebPage page)UnitcancelAll()Unitclose()-
-
Constructor Detail
-
PrivacyManagedBrowserFetcher
PrivacyManagedBrowserFetcher(BrowserManager browserManager, BrowserPrivacyManager privacyManager, BrowserEmulator browserEmulator, ImmutableConfig conf, Boolean closeCascaded)
-
-
Method Detail
-
getWebdriverFetcher
<Error class: unknown class> getWebdriverFetcher()
-
getBrowserManager
final BrowserManager getBrowserManager()
-
getPrivacyManager
BrowserPrivacyManager getPrivacyManager()
-
getBrowserEmulator
BrowserEmulator getBrowserEmulator()
-
getConf
ImmutableConfig getConf()
-
fetchContentDeferred
Response fetchContentDeferred(WebPage page)
Fetch page content
-
fetchDeferred
final Response fetchDeferred(FetchTask task)
Fetches the content of a web page asynchronously using the provided fetch task.
This method attempts to retrieve a web driver for the given page. If a specific driver is found, it is used to fetch the page content. Otherwise, the task is executed within a privacy context using the
PrivacyManagerto obtain a driver.- Parameters:
task- The fetch task containing the details of the page to be fetched.- Returns:
A
Responseobject containing the result of the fetch operation.
-
-
-
-