if (searchVerb.equals("") || searchVerb.equals(" ")) searchVerb = null;
  public void setupSubscriptions()  {    // Is this necessary?    // This asset, in this plugin, is only used to be the place    // control tasks are allocated to    Asset prototype = theLDMF.createPrototype(AbstractAsset.class, "Statistics");    dummyAsset = theLDMF.createInstance(prototype);    publishAdd(dummyAsset);    ourCluster = getClusterIdentifier();    // Open up the file for the results    String path = DEFAULT_DIRECTORY;    Vector params = getParameters() != null ? new Vector(getParameters()) : null;    if (params != null && ! params.isEmpty()) {      path = ((! (params.elementAt(0) instanceof String)) ? path : (String)params.elementAt(0));      // could do File.isDirectory() and File.canWrite() on this      // Optional second argument - verb for which tasks are searched for      if (params.size() > 1) {	// 2nd slot, number 1	searchVerb = (String)params.elementAt(1);      }      // Take the additional parameters here      if (params.size() > 2) {	if (params.size() >= 3) {	  // Blackboard statistics are the 3rd parameter, number 2          if (Integer.parseInt((String)params.elementAt(2)) != 0 ) {            wantBBStats = true;            bbMetricsService = (BlackboardMetricsService)              getServiceBroker().getService(this, BlackboardMetricsService.class,                                             new ServiceRevokedListener() {                                                public void serviceRevoked(ServiceRevokedEvent re) {                                                  if (BlackboardMetricsService.class.equals(re.getService())) {                                                    bbMetricsService = null;                                                  }                                                }                                              });          } // end of parsed non-0 int        } // end of have at least 3 params	        if ( params.size() >= 4) {	  // ProtypeRegistry stats are the 4th parameter, number 3          if (Integer.parseInt((String)params.elementAt(3)) != 0 ) {            wantProtoRegStats = true;            protoRegistryService = (PrototypeRegistryService)              getServiceBroker().getService(this, PrototypeRegistryService.class,                                             new ServiceRevokedListener() {                                                public void serviceRevoked(ServiceRevokedEvent re) {                                                  if (PrototypeRegistryService.class.equals(re.getService()))                                                    protoRegistryService  = null;                                                }                                              });                } // end of parsed non-0 int                      } // end of if have at least 4 params                if (params.size() >= 5 ) {	  // Node metrics stats are the 5th param, number 4          if (Integer.parseInt((String)params.elementAt(4)) != 0 ) {            wantNodeStats = true;              nodeMetricsService = (NodeMetricsService)              getServiceBroker().getService(this, NodeMetricsService.class,                                             new ServiceRevokedListener() {                                                public void serviceRevoked(ServiceRevokedEvent re) {                                                  if (NodeMetricsService.class.equals(re.getService())) {                                                    nodeMetricsService = null;                                                  }                                                }                                              });                          } // end of if parsed non-0 int                          } // end of if have at least 5 params	if (params.size() >= 6) {	  // Message Transport stats are the 6th parameter, number 5: They are the only one ON by default          if (Integer.parseInt((String)params.elementAt(5)) == 0 ) {            wantMessStats = false;          }	}        if (params.size() == 7) {	  // Message Watcher statistics are the 7th parameter, number 6          if (Integer.parseInt((String)params.elementAt(6)) != 0 ) {            wantMessWatchStats = true;                  messageWatchService = (MessageWatcherService)              getServiceBroker().getService(this,MessageWatcherService.class,                                             new ServiceRevokedListener() {                                                public void serviceRevoked(ServiceRevokedEvent re) {                                                  if (MessageWatcherService.class.equals(re.getService()))                                                    messageWatchService = null;                                                }                                              });               messageWatchService.addMessageTransportWatcher(_messageWatcher = new MessageWatcher());          } // end of if parsed non-0 int        } // end of if have 7 params		      } // end of if have more than 2 params            if (params.size() > 7) {	if (log.isApplicable(log.PROBLEM)) {	  // Explain the parameters correctly...	  // wantBBStats	  // wantProtoRegStats	  // wantNodeStats	  // wantMessStats -- ON by default	  // wantMessWatchStats	  log.log(this, log.PROBLEM, "MetricsPlugin Usage: [[<directory name to write results in>],[<Task Verb to search for>],[<1 or 0>], [<1 or 0>],[<1 or 0>],[<1 or 0>],[<1 or 0>]] -- where the [1/0] indicates turning on or off the following services for Metrics collection: BlackboardService, ProtypeRegistryService, NodeMetricsService, MessageStatsService, and MessageWatcherService. Default is to use only the MessageStatsService");	}	// return;      }    }    // If the path doesn't end in the separator character, add one    if (path.lastIndexOf(File.separatorChar) != path.length() - 1) {      path = path + File.separator;    }    if (log.isApplicable(log.DEBUG)) {      log.log(this, log.DEBUG, this + "Writing " + path + ourCluster + RESULTS_FILENAME_SUFFIX);    }        try {      writer = new PrintWriter(new FileWriter(path + ourCluster + RESULTS_FILENAME_SUFFIX));    } catch (IOException ioe) {      if (log.isApplicable(log.SEVERE)) {	log.log(this, log.SEVERE, "Fatal IOException opening statistics file: " + path + ourCluster + RESULTS_FILENAME_SUFFIX);      }      // should this really exit?      //System.exit(1);    }    managePlanElements = (IncrementalSubscription) subscribe(managePlanElementsPredicate);    myTasks = (IncrementalSubscription) subscribe(myTasksPredicate);    // Subscribe to tasks with the given verb    if (searchVerb != null) {      myTaskSearch = (IncrementalSubscription) subscribe(createTSPred(searchVerb));    }    //        startStatistics();    if (wantMessStats) {      messageStatsService = (MessageStatisticsService)        getBindingSite().getServiceBroker().getService(this, MessageStatisticsService.class,                                                        new ServiceRevokedListener() {							   public void serviceRevoked(ServiceRevokedEvent re) {							     if (MessageStatisticsService.class.equals(re.getService())){							       messageStatsService = null;							     }							   }							 });      if (log.isApplicable(log.VERBOSE)) {	log.log(this, log.VERBOSE, this + ": MessageStatsService is: " + messageStatsService);      }    } // end of block on messStats  } // end of setupSubscriptions()