Class ProxyContext
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public class ProxyContext implements AutoCloseable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classProxyContext.Companion
-
Field Summary
Fields Modifier and Type Field Description private final BooleanisEnabledprivate final BooleanisRetiredprivate final BooleanisActiveprivate final BooleanisReadyprivate final Map<String, Object>stateprivate ProxyEntryproxyEntrypublic final static ProxyContext.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description ProxyContext(ProxyEntry proxyEntry, ProxyPoolManager proxyPoolManager, WebDriverContext driverContext)
-
Method Summary
Modifier and Type Method Description final BooleanisEnabled()final BooleanisRetired()final BooleanisActive()final BooleanisReady()final Map<String, Object>getState()final ProxyEntrygetProxyEntry()final UnitsetProxyEntry(ProxyEntry proxyEntry)final FetchResultrun(FetchTask task, SuspendFunction2<FetchTask, WebDriver, FetchResult> browseFun)Run the task with the proxy context. Unitmaintain()Unitclose()Block until the proxy is offline -
-
Constructor Detail
-
ProxyContext
ProxyContext(ProxyEntry proxyEntry, ProxyPoolManager proxyPoolManager, WebDriverContext driverContext)
-
-
Method Detail
-
isEnabled
final Boolean isEnabled()
-
isRetired
final Boolean isRetired()
-
isActive
final Boolean isActive()
-
isReady
final Boolean isReady()
-
getState
final Map<String, Object> getState()
-
getProxyEntry
final ProxyEntry getProxyEntry()
-
setProxyEntry
final Unit setProxyEntry(ProxyEntry proxyEntry)
-
run
final FetchResult run(FetchTask task, SuspendFunction2<FetchTask, WebDriver, FetchResult> browseFun)
Run the task with the proxy context.
- Returns:
the fetch result
-
-
-
-