code: @Override
  	public void stopScan() {
  		lock.lock();
  		try {
  			if (!State.NOT_STARTED.equals(state) && !State.FINISHED.equals(state)) {
  				spiderThread.stopScan();
  				state = State.FINISHED;
  				SpiderEventPublisher.publishScanEvent(
  						ScanEventPublisher.SCAN_STOPPED_EVENT, this.scanId);
  			}
  		} finally {
  			lock.unlock();
  		}
  	}
docs: Stops the scan.
  <p>
  The call to this method has no effect if the scan was not yet started or has already finished.
  </p>