com.github.mike10004.seleniumhelp.NoProxySpecification Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selenium-capture Show documentation
Show all versions of selenium-capture Show documentation
Capture HTTP traffic generated by Selenium WebDriver in Java
package com.github.mike10004.seleniumhelp;
import org.openqa.selenium.Proxy;
import javax.annotation.Nullable;
final class NoProxySpecification {
private static final NoProxySpecification INSTANCE = new NoProxySpecification();
private final WebdrivingProxyDefinition webdriving = new NoWebdrivingProxyDefinition();
private final UpstreamProxyDefinition upstream = new NoUpstreamProxyDefinition();
private NoProxySpecification() {}
public static NoProxySpecification getInstance() {
return INSTANCE;
}
public WebdrivingProxyDefinition asWebdrivingProxyDefinition() {
return webdriving;
}
public UpstreamProxyDefinition asUpstreamProxyDefinition() {
return upstream;
}
@Override
public String toString() {
return "NoProxySpecification{}";
}
private static class NoWebdrivingProxyDefinition implements WebdrivingProxyDefinition {
@Nullable
@Override
public Proxy createWebdrivingProxy() {
return null;
}
@Override
public String toString() {
return "WebdrivingProxyDefinition{NO_PROXY}";
}
}
private static class NoUpstreamProxyDefinition implements UpstreamProxyDefinition {
@Nullable
@Override
public UpstreamProxy createUpstreamProxy() {
return null;
}
@Override
public String toString() {
return "UpstreamProxyDefinition{NO_PROXY}";
}
}
}