log = CSMART.createLogger(this.getClass().getName());
  public void setupSubscriptions()   {    log = CSMART.createLogger(this.getClass().getName());    Vector params = getParameters() != null ? new Vector(getParameters()) : null;    if ((params.size() < 2) ||        (params.size() > 4)) {      if (log.isDebugEnabled()) {	log.debug("MetricsInitializerPlugin Usage: <numProviders> <sampleInterval> [<startDelay> [<maxNumSamples>]]");      }      return;    }          // How many Agents are doing measuring?    // For each one, need an Entity to appear with the appropriate Role    //    numProviders = Integer.parseInt((String) params.elementAt(3));    numProviders = Integer.parseInt((String) params.elementAt(0));        // Time in seconds between samples. If 0, do no sampling    //    sampleInterval = Integer.parseInt((String) params.elementAt(5));    sampleInterval = Integer.parseInt((String) params.elementAt(1));    // Number of seconds to wait before starting the run.    if (params.size() > 2) {      startDelay = Integer.parseInt((String) params.elementAt(2));    }    if (params.size() > 3) {      maxNumSamples = Integer.parseInt((String) params.elementAt(3));    }    if (log.isDebugEnabled()) {      log.debug("MetricsInitializerPlugin: " +                       " numProviders = " + numProviders +                       ", sampleInterval = " +  sampleInterval +                       ", startDelay = " + startDelay +                       ", maxNumSamples = " + maxNumSamples);    }                           localAssets = (IncrementalSubscription) subscribe(localPredicate);    // Verb.getVerb("Ready");    readyAllocations  = (IncrementalSubscription) subscribe(new ControlPredicate(Verb_Ready));    // Verb.getVerb("Start");    startAllocations  = (IncrementalSubscription) subscribe(new ControlPredicate(Verb_Start));    // Verb.getVerb("Sample");    sampleAllocations  = (IncrementalSubscription) subscribe(new ControlPredicate(Verb_Sample));    // Verb.getVerb("Finish");    finishAllocations = (IncrementalSubscription) subscribe(new ControlPredicate(Verb_Finish));  }