public ModuleHandle addModule(String moduleName,String sessionKey){
  String sanitizedModuleName=generateUniqueNameIfNullOrEmpty(moduleName,"Module");
  ModuleHandle moduleHandle=new ModuleHandle(sanitizedModuleName,sessionKey);
synchronized (privateInstanceLock) {
    modules.add(moduleHandle);
  }
  setTerminated(false);
  return moduleHandle;
}

public ModuleHandle addModule ( String moduleName , String sessionKey ) { String sanitizedModuleName = generateUniqueNameIfNullOrEmpty ( moduleName , "Module" ) ; ModuleHandle moduleHandle = new ModuleHandle ( sanitizedModuleName , sessionKey ) ; synchronized ( privateInstanceLock ) { modules . add ( moduleHandle ) ; } setTerminated ( false ) ; return moduleHandle ; }
add a module that was loaded in this browser tab . if the module name is null or the empty string , a name will be generated . it is legal to add a module with the same name and session key more than once . if this browser tab was marked as terminated , then it will be reset to the unterminated state . an event will be fired to all listeners on the model . note : this method fires events . if you ' re invoking this method from other model classes , make sure that no locks are being held .
