Search in sources :

Example 6 with TRTrackerScraperResponseImpl

use of com.biglybt.core.tracker.client.impl.TRTrackerScraperResponseImpl in project BiglyBT by BiglySoftware.

the class TrackerStatus method addHash.

protected TRTrackerScraperResponseImpl addHash(HashWrapper hash) {
    TRTrackerScraperResponseImpl response;
    try {
        hashes_mon.enter();
        response = (TRTrackerScraperResponseImpl) hashes.get(hash);
        if (response == null) {
            response = new TRTrackerBTScraperResponseImpl(this, hash);
            if (scrapeURL == null) {
                response.setStatus(TRTrackerScraperResponse.ST_ERROR, MessageText.getString(SS + "error") + MessageText.getString(SSErr + "badURL"));
            } else {
                response.setStatus(TRTrackerScraperResponse.ST_INITIALIZING, MessageText.getString(SS + "initializing"));
            }
            response.setNextScrapeStartTime(checker.getNextScrapeCheckOn());
            hashes.put(hash, response);
        }
    } finally {
        hashes_mon.exit();
    }
    // notifiy listeners
    scraper.scrapeReceived(response);
    return response;
}
Also used : TRTrackerScraperResponseImpl(com.biglybt.core.tracker.client.impl.TRTrackerScraperResponseImpl)

Aggregations

TRTrackerScraperResponseImpl (com.biglybt.core.tracker.client.impl.TRTrackerScraperResponseImpl)6 LogEvent (com.biglybt.core.logging.LogEvent)4 PRUDPPacketHandlerException (com.biglybt.net.udp.uc.PRUDPPacketHandlerException)1 ClientIDException (com.biglybt.pif.clientid.ClientIDException)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 URL (java.net.URL)1