-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public abstract class BrowserInstance implements AutoCloseable
Created by vincent on 18-1-1. Copyright @ 2013-2017 Platon AI. All rights reserved
-
-
Field Summary
Fields Modifier and Type Field Description private final BrowserInstanceIdidprivate final BooleanisGUIprivate AtomicIntegertabCountprivate final List<String>navigateHistoryprivate InstantlastActiveTimeprivate final DurationidleTimeoutprivate final BooleanisIdleprivate final PathuserDataDirprivate final StringproxyServerprivate final LauncherOptionslauncherOptionsprivate final ChromeOptionslaunchOptions
-
Constructor Summary
Constructors Constructor Description BrowserInstance(Path userDataDir, String proxyServer, LauncherOptions launcherOptions, ChromeOptions launchOptions)
-
Method Summary
Modifier and Type Method Description final BrowserInstanceIdgetId()Every browser instance have a unique data dir, proxy is required to be unique too if it is enabled final BooleangetIsGUI()final AtomicIntegergetTabCount()final UnitsetTabCount(AtomicInteger tabCount)final List<String>getNavigateHistory()final InstantgetLastActiveTime()final UnitsetLastActiveTime(Instant lastActiveTime)final DurationgetIdleTimeout()final BooleangetIsIdle()final PathgetUserDataDir()final StringgetProxyServer()final LauncherOptionsgetLauncherOptions()final ChromeOptionsgetLaunchOptions()abstract Unitlaunch()-
-
Method Detail
-
getId
final BrowserInstanceId getId()
Every browser instance have a unique data dir, proxy is required to be unique too if it is enabled
-
getTabCount
final AtomicInteger getTabCount()
-
setTabCount
final Unit setTabCount(AtomicInteger tabCount)
-
getNavigateHistory
final List<String> getNavigateHistory()
-
getLastActiveTime
final Instant getLastActiveTime()
-
setLastActiveTime
final Unit setLastActiveTime(Instant lastActiveTime)
-
getIdleTimeout
final Duration getIdleTimeout()
-
getUserDataDir
final Path getUserDataDir()
-
getProxyServer
final String getProxyServer()
-
getLauncherOptions
final LauncherOptions getLauncherOptions()
-
getLaunchOptions
final ChromeOptions getLaunchOptions()
-
-
-
-