public static boolean isCurrentSite(URL url) throws Exception {
  if ((config == null) || !keepMonitoring) {
    return true;
  }
  String serverID=null;
  try {
    serverID=getServerID(url.getProtocol(),url.getHost(),Integer.toString(url.getPort()),url.getPath(),false);
  }
 catch (  ServerEntryNotFoundException e) {
    if (debug.messageEnabled()) {
      debug.message("URL is not part of AM setup.");
    }
    return true;
  }
  Vector sites=getAvailableSites();
  boolean isCurrent=false;
  if (!sites.isEmpty()) {
    String serverid=(String)sites.firstElement();
    if (serverid != null) {
      isCurrent=serverid.equalsIgnoreCase(serverID);
    }
  }
  return isCurrent;
}

public static boolean isCurrentSite ( URL url ) throws Exception { if ( ( config == null ) || ! keepMonitoring ) { return true ; } String serverID = null ; try { serverID = getServerID ( url . getProtocol ( ) , url . getHost ( ) , Integer . toString ( url . getPort ( ) ) , url . getPath ( ) , false ) ; } catch ( ServerEntryNotFoundException e ) { if ( debug . messageEnabled ( ) ) { debug . message ( "URL is not part of AM setup." ) ; } return true ; } Vector sites = getAvailableSites ( ) ; boolean isCurrent = false ; if ( ! sites . isEmpty ( ) ) { String serverid = ( String ) sites . firstElement ( ) ; if ( serverid != null ) { isCurrent = serverid . equalsIgnoreCase ( serverID ) ; } } return isCurrent ; }
checks if the url is one of configured sites .
