private void complete ( ) { if ( stopped ) { return ; } log . info ( "Spidering process is complete. Shutting down..." ) ; this . stopped = true ; if ( httpSender != null ) { this . getHttpSender ( ) . shutdown ( ) ; httpSender = null ; } // Notify the controller to clean up memory controller . reset ( ) ; // Issue the shutdown command on a separate thread, as the current thread is most likely one // from the pool new Thread ( new Runnable ( ) { @ Override public void run ( ) { if ( threadPool != null ) { threadPool . shutdown ( ) ; } // Notify the listeners -- in the meanwhile notifyListenersSpiderComplete ( true ) ; controller . reset ( ) ; threadPool = null ; } } , "ZAP-SpiderShutdownThread-" + id ) . start ( ) ; }
The Spidering process is complete .