Call this method if you are running the scanner service in a different process in order to
synchronize any configuration settings, including BeaconParsers to the scanner
@see #isScannerInDifferentProcess()
349258
public void applySettings() {
        if (determineIfCalledFromSeparateScannerProcess()) {
            return;
        }
        if (!isAnyConsumerBound()) {
            LogManager.d(TAG, "Not synchronizing settings to service, as it has not started up yet");
        } else if (isScannerInDifferentProcess()) {
            LogManager.d(TAG, "Synchronizing settings to service");
            syncSettingsToService();
        } else {
            LogManager.d(TAG, "Not synchronizing settings to service, as it is in the same process");
        }
    }
1103851
protected void notifyStartBundlingProcess() {

		for (BundlingProcessLifeCycleListener listener : lifeCycleListeners) {
			listener.beforeBundlingProcess();
		}
		processingBundle.set(true);
		synchronized (processingBundle) {
			processingBundle.notifyAll();
		}
	}
425588
public void notifyProcessListener(Token token, Action action) {
		if (processListener != null) {
			processListener.log(this, token, action);
		}
	}
778737
function (callback) {
    if (!scanner) {
      initTools(function (err, s) {
        if (err) {
          return callback(err);
        }
        scanner = s;
        scanNetworks(callback);
      });
      return;
    }
    scanNetworks(callback);
  }
1292329
protected boolean checkConfiguration(IProgressMonitor progress) {
		assert progress != null;
		progress.subTask(Messages.SarlBatchCompiler_55);
		final File output = getOutputPath();
		if (getLogger().isDebugEnabled()) {
			getLogger().debug(Messages.SarlBatchCompiler_35, output);
		}
		if (output == null) {
			reportInternalError(Messages.SarlBatchCompiler_36);
			return false;
		}
		progress.subTask(Messages.SarlBatchCompiler_56);
		for (final File sourcePath : getSourcePaths()) {
			if (progress.isCanceled()) {
				return false;
			}
			try {
				if (getLogger().isDebugEnabled()) {
					getLogger().debug(Messages.SarlBatchCompiler_37, sourcePath);
				}
				if (isContainedIn(output.getCanonicalFile(), sourcePath.getCanonicalFile())) {
					reportInternalError(Messages.SarlBatchCompiler_10, output, sourcePath);
					return false;
				}
			} catch (IOException e) {
				reportInternalError(Messages.SarlBatchCompiler_11, e);
			}
		}
		return true;
	}
745976
@Override
    void setScanResult(final ScanResult scanResult) {
        super.setScanResult(scanResult);
        if (this.typeDescriptor != null) {
            this.typeDescriptor.setScanResult(scanResult);
        }
        if (this.typeSignature != null) {
            this.typeSignature.setScanResult(scanResult);
        }
        if (this.annotationInfo != null) {
            for (final AnnotationInfo ai : this.annotationInfo) {
                ai.setScanResult(scanResult);
            }
        }
        if (this.parameterAnnotationInfo != null) {
            for (final AnnotationInfo[] pai : this.parameterAnnotationInfo) {
                if (pai != null) {
                    for (final AnnotationInfo ai : pai) {
                        ai.setScanResult(scanResult);
                    }
                }
            }
        }
        if (this.parameterInfo != null) {
            for (final MethodParameterInfo mpi : parameterInfo) {
                mpi.setScanResult(scanResult);
            }
        }
    }
826854
public void process()
    {
        try
        {
            check();

            boolean isReconcilePhase = false;

            // In the Eclipse IDE's integration between JDT and APT, annotation processors
            // run in two phases -- reconcile and build.  These translate into the
            // check and generate phases for a TwoPhaseAnnotationProcessor.  In order to
            // optimize for hosting in this environment (and other IDE-centric AP environments)
            // the generate phase can be cut out when performing only the check phase.
            // Custom AP environments that wish to control this shoudl set the "phase" flag of the
            // annotation processor to "RECONCILE".
            try {
                String phase = (String)CompilerUtils.isReconcilePhase(getAnnotationProcessorEnvironment());
                isReconcilePhase = "RECONCILE".equals(phase);
            }
            catch(FatalCompileTimeException e) {
                e.printDiagnostic(this);
            }

            // Do not call generate if check resulted in errors of if the AP is running in
            // a phase called "reconcile"
            if (!isReconcilePhase && !hasErrors()) {
                generate();
            }
        }
        catch ( FatalCompileTimeException e )
        {
            e.printDiagnostic( this );
        }
    }
420176
public void process(final boolean asynch)
          throws NotificationException {
    if (asynch) {
      try {
        consumer.setMessageListener(this);
        return;
      } catch (final JMSException je) {
        throw new NotificationException(je);
      }
    }

    while (running) {
      final Message m = conn.receive();

      if (m == null) {
        running = false;
        return;
      }
      onMessage(m);
    }
  }
283083
@Override
	public void setBundlingProcessLifeCycleListeners(List<BundlingProcessLifeCycleListener> listeners) {
		this.lifeCycleListeners.clear();
		this.lifeCycleListeners.addAll(listeners);
	}
195584
public void setActiveScan(ActiveScan scan) {
        this.scan = scan;

        if (scan == null) {
            return;
        }
        getHostSelect().removeAll();
        for (HostProcess hp : scan.getHostProcesses()) {
        	getHostSelect().addItem(hp.getHostAndPort());
        }

        Thread thread = new Thread() {
            @Override
            public void run() {
                while (!stopThread) {
                	SwingUtilities.invokeLater(new Runnable(){
						@Override
						public void run() {
							updateProgress();
						}});
                    
                    try {
                        sleep(200);
                        
                    } catch (InterruptedException e) {
                        // Ignore
                    }
                }
            }
        };
        
        thread.start();
    }
1316693
public void postProcessBeanFactory(final ConfigurableListableBeanFactory beanFactory) throws BeansException {

		if (beanFactory == null) {
			return;
		}

		String[] beanNames = beanFactory.getBeanDefinitionNames();
		int singletonBeanCount = 0;

		for (int i = 0; i < beanNames.length; i++) {
			// using beanDefinition to check singleton property because when
			// accessing through
			// context (applicationContext.isSingleton(beanName)), bean will be
			// created already,
			// possibly bypassing other BeanFactoryPostProcessors
			BeanDefinition beanDefinition = beanFactory.getBeanDefinition(beanNames[i]);

			if (beanDefinition.isSingleton()) {
				singletonBeanCount++;
			}

		}

		this.progressMonitor.taskStarted(this.loadingAppContextMessage, singletonBeanCount);

		beanFactory.addBeanPostProcessor(new ProgressMonitoringBeanPostProcessor(beanFactory));

	}
270700
public void setProcessing(final boolean processing) {
        final boolean old = this.processing;
        this.processing = processing;

        this.pcs.firePropertyChange("processing", old, this.processing);
    }
1193650
public function check() : void {
        $processesInfo = $this->getProcessesInfo();

        foreach($this->processes as $process) {
            foreach($processesInfo as $processInfo) {
                if( Str::startsWith($processInfo->getCommand(), $process->getCommand()) ) {
                    $process->setInfo($processInfo);
                    break 2;
                }
            }
        }

        $this->checked = true;
    }
245456
protected function checkProcessStatus(): void
    {
        $this->logProcessStandardStreams();

        $process = $this->process;

        if (!empty($process->getErrorOutput())) {
            if (IdleTimeoutException::exceptionApplies($process)) {
                throw new IdleTimeoutException(
                    $this->options['idle_timeout'],
                    new NodeFatalException($process, $this->options['debug'])
                );
            } else if (NodeFatalException::exceptionApplies($process)) {
                throw new NodeFatalException($process, $this->options['debug']);
            } elseif ($process->isTerminated() && !$process->isSuccessful()) {
                throw new ProcessFailedException($process);
            }
        }

        if ($process->isTerminated()) {
            throw new Exceptions\ProcessUnexpectedlyTerminatedException($process);
        }
    }
198157
function() {
      if (this.scanner) {
        this.parent.clearTimeout(this.documentScan);
        this.documentScan = this.parent.setTimeout(this.scanner, this.options.continuousScanning);
      }
    }
1217023
private boolean initialzeScanHelper() {
        mScanHelper = new ScanHelper(this);
        mScanState = ScanState.restore(ScanJob.this);
        mScanState.setLastScanStartTimeMillis(System.currentTimeMillis());
        mScanHelper.setMonitoringStatus(mScanState.getMonitoringStatus());
        mScanHelper.setRangedRegionState(mScanState.getRangedRegionState());
        mScanHelper.setBeaconParsers(mScanState.getBeaconParsers());
        mScanHelper.setExtraDataBeaconTracker(mScanState.getExtraBeaconDataTracker());
        if (mScanHelper.getCycledScanner() == null) {
            try {
                mScanHelper.createCycledLeScanner(mScanState.getBackgroundMode(), null);
            }
            catch (OutOfMemoryError e) {
                LogManager.w(TAG, "Failed to create CycledLeScanner thread.");
                return false;
            }
        }
        return true;
    }
1162838
public void process( FastQueue<AssociatedIndex> matches , int numSource , int numDestination ) {

		if( checkSource ) {
			if( checkDestination ) {
				processSource(matches, numSource, firstPass);
				processDestination(firstPass,numDestination,pruned);
			} else {
				processSource(matches, numSource, pruned);
			}
		} else if( checkDestination ) {
			processDestination(matches,numDestination,pruned);
		} else {
			// well this was pointless, just return the input set
			pruned = matches;
		}
	}