Exemple #1
0
  public ModuleManager(Receptor rec) {
    mlce = new ModuleListChangedEvent(rec);
    mae = new ModuleAddedEvent(rec);
    mre = new ModuleRemovedEvent(rec);

    recOut = rec.getOutComm();
    dbReportListeners = new LinkedList();
    listeners = new LinkedList();
    receptor = rec;
    modToHandle = new HashMap();
    hashToModule = new HashMap();
    handleToAnalMod = new HashMap();
    handles = new LinkedList();
    nameToFInst = new HashMap();

    downloadSet = Collections.synchronizedSet(new HashSet());
    checkingSet = Collections.synchronizedSet(new HashSet());
    phantomModules = Collections.synchronizedList(new LinkedList());

    ModuleLinker linker = receptor.getLinker();
    Iterator it = linker.getDescriptors().iterator();
    while (it.hasNext()) {
      ModuleDescriptor desc = (ModuleDescriptor) it.next();
      if (desc.getType() == Descriptor.TYPE_FLOW) {
        loadFlowModule(desc);
      }
    }

    refresh = Settings.v().getRefreshInterval();
    Settings.v().addConfigChangeListener(this);
    receptor.getLinker().addModuleLinkerListener(this);

    (refThread = new Thread(this, "Module Manager")).start();
  }
Exemple #2
0
 public void configurationChanged() {
   refresh = Settings.v().getRefreshInterval();
 }