public class SelfRegisteringRemote
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private org.openqa.selenium.remote.internal.HttpClientFactory |
httpClientFactory |
private static java.util.logging.Logger |
LOG |
private RegistrationRequest |
nodeConfig |
private java.util.Map<java.lang.String,java.lang.Class<? extends javax.servlet.Servlet>> |
nodeServlets |
private GridNodeServer |
server |
Constructor and Description |
---|
SelfRegisteringRemote(RegistrationRequest config) |
Modifier and Type | Method and Description |
---|---|
void |
addBrowser(org.openqa.selenium.remote.DesiredCapabilities cap,
int instances)
Adding the browser described by the capability, automatically finding out what platform the
node is launched from
|
private void |
addExtraServlets(java.util.List<java.lang.String> servlets) |
void |
deleteAllBrowsers() |
private static com.google.gson.JsonObject |
extractObject(org.apache.http.HttpResponse resp) |
GridNodeConfiguration |
getConfiguration() |
private GridHubConfiguration |
getHubConfiguration()
uses the hub API to get some of its configuration.
|
protected java.util.Map<java.lang.String,java.lang.Class<? extends javax.servlet.Servlet>> |
getNodeServlets() |
java.net.URL |
getRemoteURL() |
protected GridNodeServer |
getServer() |
private boolean |
isAlreadyRegistered(RegistrationRequest node) |
private void |
registerToHub(boolean checkPresenceFirst) |
void |
sendRegistrationRequest()
sends 1 registration request, bypassing the retry logic and the proxy already registered check.
|
void |
setMaxConcurrent(int max) |
void |
setRemoteServer(GridNodeServer server) |
void |
setTimeout(int timeout,
int cycle) |
void |
startRegistrationProcess()
register the hub following the configuration :
|
void |
startRemoteServer() |
void |
stopRemoteServer() |
(package private) void |
updateConfigWithRealPort() |
private static final java.util.logging.Logger LOG
private final RegistrationRequest nodeConfig
private final org.openqa.selenium.remote.internal.HttpClientFactory httpClientFactory
private final java.util.Map<java.lang.String,java.lang.Class<? extends javax.servlet.Servlet>> nodeServlets
private GridNodeServer server
public SelfRegisteringRemote(RegistrationRequest config)
public java.net.URL getRemoteURL()
public void setRemoteServer(GridNodeServer server)
public void startRemoteServer() throws java.lang.Exception
java.lang.Exception
public void stopRemoteServer()
public void deleteAllBrowsers()
public void addBrowser(org.openqa.selenium.remote.DesiredCapabilities cap, int instances)
cap
- describing the browserinstances
- number of times this browser can be started on the node.public void sendRegistrationRequest()
public void startRegistrationProcess()
- check if the proxy is already registered before sending a reg request.
- register again every X ms is specified in the config of the node.
public void setTimeout(int timeout, int cycle)
public void setMaxConcurrent(int max)
public GridNodeConfiguration getConfiguration()
protected GridNodeServer getServer()
GridNodeServer
for this remoteprotected java.util.Map<java.lang.String,java.lang.Class<? extends javax.servlet.Servlet>> getNodeServlets()
Servlet
s that this remote will bindprivate void registerToHub(boolean checkPresenceFirst)
private void addExtraServlets(java.util.List<java.lang.String> servlets)
void updateConfigWithRealPort() throws java.net.MalformedURLException
java.net.MalformedURLException
private GridHubConfiguration getHubConfiguration() throws java.lang.Exception
java.lang.Exception
private boolean isAlreadyRegistered(RegistrationRequest node)
private static com.google.gson.JsonObject extractObject(org.apache.http.HttpResponse resp) throws java.io.IOException
java.io.IOException