private String findAgentUrl(Configuration pConfig) {
        // System property has precedence
        String url = System.getProperty("jolokia." + ConfigKey.DISCOVERY_AGENT_URL.getKeyValue());
        if (url == null) {
            url = System.getenv("JOLOKIA_DISCOVERY_AGENT_URL");
            if (url == null) {
                url = pConfig.get(ConfigKey.DISCOVERY_AGENT_URL);
            }
        }
        return NetworkUtil.replaceExpression(url);
    }
private String findAgentUrl ( Configuration pConfig ) { String url = System . getProperty ( "jolokia." + ConfigKey . DISCOVERY_AGENT_URL . getKeyValue ( ) ) ; if ( url == null ) { url = System . getenv ( "JOLOKIA_DISCOVERY_AGENT_URL" ) ; if ( url == null ) { url = pConfig . get ( ConfigKey . DISCOVERY_AGENT_URL ) ; } } return NetworkUtil . replaceExpression ( url ) ; }
Try to find an URL for system props or config