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
-
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 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
-
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
-
maintain
Unit maintain()
-
close
Unit close()
Block until the proxy is offline
-
-
-
-