protected void handleTrackerAnnounceResponse ( TrackerMessage message , boolean inhibitEvents , String hexInfoHash ) throws AnnounceException { if ( message instanceof ErrorMessage ) { ErrorMessage error = ( ErrorMessage ) message ; throw new AnnounceException ( error . getReason ( ) ) ; } if ( ! ( message instanceof AnnounceResponseMessage ) ) { throw new AnnounceException ( "Unexpected tracker message type " + message . getType ( ) . name ( ) + "!" ) ; } AnnounceResponseMessage response = ( AnnounceResponseMessage ) message ; this . fireAnnounceResponseEvent ( response . getComplete ( ) , response . getIncomplete ( ) , response . getInterval ( ) , hexInfoHash ) ; if ( inhibitEvents ) { return ; } this . fireDiscoveredPeersEvent ( response . getPeers ( ) , hexInfoHash ) ; }
Handle the announce response from the tracker .