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); } }
  private static void readIdmefListeners(InputStream listenersIs) {    BufferedReader br = new BufferedReader(new InputStreamReader(listenersIs));    String line = null;    try {      while ( (line = br.readLine()) != null) {              }    } catch (IOException e) {      if (_log.isErrorEnabled()) {        _log.error("Unable to read IDMEF listeners: " + e);      }    }  }