-
- All Implemented Interfaces:
-
ai.platon.pulsar.crawl.fetch.driver.Browser,java.lang.AutoCloseable
public abstract class AbstractBrowser implements Browser
-
-
Field Summary
Fields Modifier and Type Field Description private final List<NavigateEntry>navigateHistoryprivate final Queue<WebDriver>driversprivate final BooleanisIdleprivate final BooleanisGUIprivate final DurationidleTimeoutprivate final ObjectshutdownMonitorprivate ThreadshutdownHookprivate final BrowserInstanceIdidprivate final BrowserSettingsbrowserSettings
-
Constructor Summary
Constructors Constructor Description AbstractBrowser(BrowserInstanceId id, BrowserSettings browserSettings)
-
Method Summary
Modifier and Type Method Description List<NavigateEntry>getNavigateHistory()Queue<WebDriver>getDrivers()BooleangetIsIdle()final BooleangetIsGUI()final DurationgetIdleTimeout()ObjectgetShutdownMonitor()Synchronization monitor for the "refresh" and "destroy" ThreadgetShutdownHook()Reference to the JVM shutdown hook, if registered UnitsetShutdownHook(Thread shutdownHook)Reference to the JVM shutdown hook, if registered BrowserInstanceIdgetId()final BrowserSettingsgetBrowserSettings()UnitregisterShutdownHook()Register a shutdown hook with the JVM runtime, closing this context on JVM shutdown unless it has already been closed at that time. Unitawait()UnitsignalAll()UnitonWillNavigate(NavigateEntry entry)Unitclose()-
-
Constructor Detail
-
AbstractBrowser
AbstractBrowser(BrowserInstanceId id, BrowserSettings browserSettings)
-
-
Method Detail
-
getNavigateHistory
List<NavigateEntry> getNavigateHistory()
-
getDrivers
Queue<WebDriver> getDrivers()
-
getIdleTimeout
final Duration getIdleTimeout()
-
getShutdownMonitor
Object getShutdownMonitor()
Synchronization monitor for the "refresh" and "destroy"
-
getShutdownHook
Thread getShutdownHook()
Reference to the JVM shutdown hook, if registered
-
setShutdownHook
Unit setShutdownHook(Thread shutdownHook)
Reference to the JVM shutdown hook, if registered
-
getId
BrowserInstanceId getId()
-
getBrowserSettings
final BrowserSettings getBrowserSettings()
-
registerShutdownHook
Unit registerShutdownHook()
Register a shutdown hook with the JVM runtime, closing this context on JVM shutdown unless it has already been closed at that time.
Delegates to
doClose()for the actual closing procedure.
-
onWillNavigate
Unit onWillNavigate(NavigateEntry entry)
-
-
-
-