private void checkValidStateChange(IWirelessSniffingModule module) {
   if (running)
     throw new IllegalStateException("Cannot enable/disable modules while daemon is running");
   if (!wirelessModules.contains(module))
     throw new IllegalArgumentException(
         "Cannot enable/disable unknown module : " + module.getName());
 }
 void removeModule(IWirelessSniffingModule module) {
   disableModule(module);
   synchronized (wirelessModules) {
     wirelessModules.remove(module);
     modulesByName.remove(module.getName());
   }
 }
 void addModule(IWirelessSniffingModule module) {
   synchronized (wirelessModules) {
     wirelessModules.add(module);
     modulesByName.put(module.getName(), module);
   }
   enableModule(module);
 }
 void requestModuleInformation(IMessenger messenger, RequestWirelessModuleInformation msg)
     throws MessengerException {
   final List<ModuleRecord> modules = new ArrayList<ModuleRecord>();
   for (IWirelessSniffingModule m : wirelessModules) {
     modules.add(new ModuleRecord(m.getName(), isWirelessModuleEnabled(m)));
   }
   messenger.emitMessage(msg.createResponse(modules));
 }