public SeLionSauceProxy(RegistrationRequest request, GridRegistry registry) { super(fixTimeout(request), registry); down = false; poll = true; pollingInterval = config.nodePolling != null ? config.nodePolling : DEFAULT_POLLING_INTERVAL; downPollingLimit = config.downPollingLimit != null ? config.downPollingLimit : DEFAULT_DOWN_POLLING_LIMIT; if ((pollingInterval <= 0) || (downPollingLimit <= 0)) { poll = false; } if (!SauceServlet.PROXY_ID.equals(remoteHost.toExternalForm())) { throw new GridException(SeLionSauceProxy.class.getSimpleName() + " can not be used by an external process"); } try { sauceConfigReader = SauceConfigReader.getInstance(); defaultParentTunnel = sauceConfigReader.getDefaultParentTunnel(); defaultTunnelIdentifier = sauceConfigReader.getDefaultTunnelIdentifier(); sauceApi = new SauceLabsRestApi(); } catch (GridConfigurationException e) { throw new GridException("Failed to initialize proxy: ", e); } renderer = new WebProxyHtmlRenderer(this); }
public SeLionSauceProxy(RegistrationRequest request, Registry registry) { super(fixTimeout(request), registry); down = false; poll = true; pollingInterval = request.getConfigAsInt(RegistrationRequest.NODE_POLLING, DEFAULT_POLLING_INTERVAL); downPollingLimit = request.getConfigAsInt(RegistrationRequest.DOWN_POLLING_LIMIT, DEFAULT_DOWN_POLLING_LIMIT); if ((pollingInterval <= 0) || (downPollingLimit <= 0)) { poll = false; } if (!SauceServlet.PROXY_ID.equals(remoteHost.toExternalForm())) { throw new GridException(SeLionSauceProxy.class.getSimpleName() + " can not be used by an external process"); } try { sauceConfigReader = SauceConfigReader.getInstance(); defaultParentTunnel = sauceConfigReader.getDefaultParentTunnel(); defaultTunnelIdentifier = sauceConfigReader.getDefaultTunnelIdentifier(); sauceApi = new SauceLabsRestApi(); } catch (GridConfigurationException e) { throw new GridException("Failed to initialize proxy: ", e); } renderer = new WebProxyHtmlRenderer(this); }