public String resolveURL(String syncUrl,String registrationUrl){
  if (StringUtils.isBlank(syncUrl) || syncUrl.startsWith(Constants.PROTOCOL_NONE)) {
    log.debug("Using the registration URL to contact the remote node because the syncURL for the node is blank");
    return registrationUrl;
  }
  try {
    URI uri=new URI(syncUrl);
    for (    ISyncUrlExtension handler : extensionService.getExtensionPointList(ISyncUrlExtension.class)) {
      syncUrl=handler.resolveUrl(uri);
      uri=new URI(syncUrl);
    }
  }
 catch (  URISyntaxException e) {
    log.error(e.getMessage(),e);
  }
  return syncUrl;
}

public String resolveURL ( String syncUrl , String registrationUrl ) { if ( StringUtils . isBlank ( syncUrl ) || syncUrl . startsWith ( Constants . PROTOCOL_NONE ) ) { log . debug ( "Using the registration URL to contact the remote node because the syncURL for the node is blank" ) ; return registrationUrl ; } try { URI uri = new URI ( syncUrl ) ; for ( ISyncUrlExtension handler : extensionService . getExtensionPointList ( ISyncUrlExtension . class ) ) { syncUrl = handler . resolveUrl ( uri ) ; uri = new URI ( syncUrl ) ; } } catch ( URISyntaxException e ) { log . error ( e . getMessage ( ) , e ) ; } return syncUrl ; }
build the url for remote node communication . use the remote sync_url first , if it is null or blank , then use the registration url instead .
