Gets a URL for the Internet connection check.
@return  an "always up" server for Internet connectivity testing, or {@code null} if we are going to skip the test.
501368
@Exported
    @CheckForNull
    public String getConnectionCheckUrl() {
        Data dt = getData();
        if(dt==null)    return "http://www.google.com/";
        return dt.connectionCheckUrl;
    }
925736
public static boolean checkServerConnection(String serverURL) {
        boolean value = false;
        try {
            value = new RetrieveCheckServerConnectionString().execute(serverURL).get();
        } catch (InterruptedException e) {
            QuickUtils.log.e("InterruptedException", e);
        } catch (ExecutionException e) {
            QuickUtils.log.e("ExecutionException", e);
        }
        return value;
    }
645365
public UaTcpStackServer getServer(String endpointUrl) {
        String path = pathOrUrl(endpointUrl);

        UaTcpStackServer server = servers.get(path);

        if (server == null && servers.size() == 1 && !strictEndpointUrlsEnabled) {
            Iterator<UaTcpStackServer> iterator = servers.values().iterator();

            if (iterator.hasNext()) {
                server = iterator.next();
            }
        }

        return server;
    }
996451
public static Connection getconnnection() {
		Connection con = null;
		try {
			con = DriverManager.getConnection(url, userName, password);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return con;
	}
1106654
public static String getHostFromURL(String url) {
		URL u = toURL(url);
		String host = (u == null) ? "" : u.getHost();
		return host;
	}
186936
public HttpServletRequest getRequest() {
        HttpServletRequest request = threadLocalRequests.get();
        return request == null ? orginal : request;
    }
153327
public static function getCurrentUrl() 
    {
        $pageURL = 'http';
        
        if (isset($_SERVER["HTTPS"])) 
        {
            $pageURL .= "s";
        }
        
        $pageURL .= "://";

        if ($_SERVER["SERVER_PORT"] != "80") 
        {
            $pageURL .= $_SERVER["SERVER_NAME"] . ":" . 
                        $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
        } 
        else 
        {
            $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
        }

        return $pageURL;
    }
321959
public String getServerUrl() {
        if (StringUtils.hasText(this.serverUrl)) {
            return serverUrl;
        } else {
            return "service:jmx:" + protocol + ":///jndi/" + protocol + "://" + host + ":" + port + (binding != null ? "/" + binding : "");
        }
    }
613238
public StringBuffer getRequestURL() {

		StringBuffer result = null;
		if(requestURL != null){
			result = new StringBuffer(requestURL);
		}
		
		return result;
	}
1156175
public Server getServerByUri(final String uri) {
        for (Server server : SERVERS) {
            if (server.getManagementUri().equals(uri)) {
                return server;
            }
        }

        return null;
    }
267016
private URLConnection openConnection() throws IOException {
		return (null == this.proxy) ? url.openConnection() : url.openConnection(this.proxy);
	}
827726
public static function getCurrentURL()
    {
        $pageURL = 'http';
        if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on")
        {
            $pageURL .= "s";
        }
        $pageURL .= "://";
        if ($_SERVER["SERVER_PORT"] != "80")
        {
            $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
        }
        else
        {
            $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
        }
        return $pageURL;
    }
485570
private URL getUrl() {
		ClassLoader loader = Thread.currentThread().getContextClassLoader();
		URL url = loader.getResource(this.getPath());
		return url;
	}
144923
public static String getServerHost() {
        String ret = getLatkeProperty("serverHost");
        if (null == ret) {
            final RequestContext requestContext = REQUEST_CONTEXT.get();
            if (null != requestContext) {
                ret = requestContext.getRequest().getServerName();
            } else {
                initPublicIP();

                return PUBLIC_IP;
            }
        }

        return ret;
    }
513168
@Override
	public URL getURL() throws IOException {
		URL url = resolveURL();
		if (url == null) {
			throw new FileNotFoundException(getDescription() + " cannot be resolved to URL because it does not exist");
		}
		return url;
	}
1054091
protected HttpURLConnection getConnection() {
        try {
            HttpURLConnection connection;
            if (proxy != null) {
                connection = (HttpURLConnection) sentryUrl.openConnection(proxy);
            } else {
                connection = (HttpURLConnection) sentryUrl.openConnection();
            }

            if (bypassSecurity && connection instanceof HttpsURLConnection) {
                ((HttpsURLConnection) connection).setHostnameVerifier(NAIVE_VERIFIER);
            }
            connection.setRequestMethod("POST");
            connection.setDoOutput(true);
            connection.setConnectTimeout(connectionTimeout);
            connection.setReadTimeout(readTimeout);
            connection.setRequestProperty(USER_AGENT, SentryEnvironment.getSentryName());
            connection.setRequestProperty(SENTRY_AUTH, getAuthHeader());

            if (marshaller.getContentType() != null) {
                connection.setRequestProperty("Content-Type", marshaller.getContentType());
            }

            if (marshaller.getContentEncoding() != null) {
                connection.setRequestProperty("Content-Encoding", marshaller.getContentEncoding());
            }

            return connection;
        } catch (IOException e) {
            throw new IllegalStateException("Couldn't set up a connection to the Sentry server.", e);
        }
    }
27901
public String download() {

        try {
            HttpURLConnection conn = getConnection();
            return readConnection(conn);

        } catch (Exception e) {
            Assert.fail(e.getMessage());
        }
        return null;
    }