public class ClientUtil extends Object
| Constructor and Description |
|---|
ClientUtil() |
| Modifier and Type | Method and Description |
|---|---|
static AdvancedHostResolver |
createDnsJavaResolver()
Creates a
DnsJavaResolver instance that can be used when
calling BrowserMobProxy.setHostNameResolver(net.lightbody.bmp.proxy.dns.AdvancedHostResolver). |
static AdvancedHostResolver |
createDnsJavaWithNativeFallbackResolver()
Creates a
ChainedHostResolver instance that first attempts to resolve a hostname using a
DnsJavaResolver, then uses NativeCacheManipulatingResolver. |
static AdvancedHostResolver |
createNativeCacheManipulatingResolver()
Creates a
NativeCacheManipulatingResolver instance that can be used when
calling BrowserMobProxy.setHostNameResolver(net.lightbody.bmp.proxy.dns.AdvancedHostResolver). |
static AdvancedHostResolver |
createNativeResolver()
Creates a
NativeResolver instance that does not support cache manipulation that can be used when
calling BrowserMobProxy.setHostNameResolver(net.lightbody.bmp.proxy.dns.AdvancedHostResolver). |
static org.openqa.selenium.Proxy |
createSeleniumProxy(BrowserMobProxy browserMobProxy)
Creates a Selenium Proxy object from the BrowserMobProxy instance.
|
static org.openqa.selenium.Proxy |
createSeleniumProxy(BrowserMobProxy browserMobProxy,
InetAddress connectableAddress)
Creates a Selenium Proxy object from the BrowserMobProxy instance, using the specified connectableAddress as the Selenium Proxy object's
proxy address.
|
static org.openqa.selenium.Proxy |
createSeleniumProxy(InetSocketAddress connectableAddressAndPort)
Creates a Selenium Proxy object using the specified connectableAddressAndPort as the HTTP proxy server.
|
static InetAddress |
getConnectableAddress()
Attempts to retrieve a "connectable" address for this device that other devices on the network can use to connect to a local proxy.
|
public static AdvancedHostResolver createNativeCacheManipulatingResolver()
NativeCacheManipulatingResolver instance that can be used when
calling BrowserMobProxy.setHostNameResolver(net.lightbody.bmp.proxy.dns.AdvancedHostResolver).public static AdvancedHostResolver createNativeResolver()
NativeResolver instance that does not support cache manipulation that can be used when
calling BrowserMobProxy.setHostNameResolver(net.lightbody.bmp.proxy.dns.AdvancedHostResolver).public static AdvancedHostResolver createDnsJavaResolver()
DnsJavaResolver instance that can be used when
calling BrowserMobProxy.setHostNameResolver(net.lightbody.bmp.proxy.dns.AdvancedHostResolver).public static AdvancedHostResolver createDnsJavaWithNativeFallbackResolver()
ChainedHostResolver instance that first attempts to resolve a hostname using a
DnsJavaResolver, then uses NativeCacheManipulatingResolver.
Can be used when calling BrowserMobProxy.setHostNameResolver(net.lightbody.bmp.proxy.dns.AdvancedHostResolver).public static org.openqa.selenium.Proxy createSeleniumProxy(BrowserMobProxy browserMobProxy)
getConnectableAddress().browserMobProxy - started BrowserMobProxy instance to read connection information fromIllegalStateException - if the proxy has not been started.public static org.openqa.selenium.Proxy createSeleniumProxy(BrowserMobProxy browserMobProxy, InetAddress connectableAddress)
BrowserMobProxy.getPort(). The BrowserMobProxy must be started.browserMobProxy - started BrowserMobProxy instance to read the port fromconnectableAddress - the network address the Selenium Proxy will use to reach this BrowserMobProxy instanceIllegalStateException - if the proxy has not been started.public static org.openqa.selenium.Proxy createSeleniumProxy(InetSocketAddress connectableAddressAndPort)
connectableAddressAndPort - the network address (or hostname) and port the Selenium Proxy will use to reach its
proxy server (the InetSocketAddress may be unresolved).public static InetAddress getConnectableAddress()
Copyright © 2015. All Rights Reserved.