public void start ( final URI defaultTrackerURI , final AnnounceResponseListener listener , final Peer [ ] peers , final int announceInterval ) { myAnnounceInterval = announceInterval ; myPeers . addAll ( Arrays . asList ( peers ) ) ; if ( defaultTrackerURI != null ) { try { myDefaultTracker = myTrackerClientFactory . createTrackerClient ( myPeers , defaultTrackerURI ) ; myDefaultTracker . register ( listener ) ; this . clients . put ( defaultTrackerURI . toString ( ) , myDefaultTracker ) ; } catch ( Exception e ) { } } else { myDefaultTracker = null ; } this . stop = false ; this . forceStop = false ; if ( this . thread == null || ! this . thread . isAlive ( ) ) { this . thread = new Thread ( this ) ; this . thread . setName ( "torrent tracker announce thread" ) ; this . thread . start ( ) ; } }
Start the announce request thread .