params[0] = Class.forName("org.cougaar.core.security.monitoring.event.FailureEvent");
params[0] = FailureEvent.class;
  private static void readIdmefListeners(InputStream listenersIs) {    BufferedReader br = new BufferedReader(new InputStreamReader(listenersIs));    Pattern p1 = Pattern.compile("(\\S*)\\s*(\\S*)");    String line = null;    try {      while ( (line = br.readLine()) != null) {        if (line.startsWith("#")) {          continue;        }        Matcher matcher = p1.matcher(line);        if (matcher.find()) {          Class eventClass = null;          Class sensorClass = null;          Method publishEventMethod = null;          String eventClassName = matcher.group(1);          if (eventClassName != null) {            try {              eventClass = Class.forName(eventClassName);            } catch (ClassNotFoundException e1) {              if (_log.isErrorEnabled()) {                _log.error("Unable to find event class name: " + eventClassName);              }            }          }                    String sensorClassName = matcher.group(2);          if (sensorClassName != null) {            try {              sensorClass = Class.forName(sensorClassName);              Class[] params = new Class[1];              params[0] = Class.forName("org.cougaar.core.security.monitoring.event.FailureEvent");              publishEventMethod = sensorClass.getDeclaredMethod("publishEvent", params);            } catch (ClassNotFoundException e1) {              if (_log.isErrorEnabled()) {                _log.error("Unable to find sensor class: " + eventClassName, e1);              }            } catch (SecurityException e) {              if (_log.isErrorEnabled()) {                _log.error("Unable to find sensor class: " + eventClassName, e);              }            } catch (NoSuchMethodException e) {              if (_log.isErrorEnabled()) {                _log.error("Unable to find sensor class: " + eventClassName, e);              }            }          }          if (eventClass != null && publishEventMethod != null) {            m_eventTypes.put(eventClass, publishEventMethod);          }        }      }    } catch (IOException e) {      if (_log.isErrorEnabled()) {        _log.error("Unable to read IDMEF listeners: " + e);      }    }  }