import freenet.node.RequestStarter;
import freenet.support.api.Bucket;
-import com.google.common.annotations.VisibleForTesting;
-
/**
* The Sone downloader is responsible for download Sones as they are updated.
*
* The core
* @param freenetInterface
* The Freenet interface
- */
- @Inject
- public SoneDownloaderImpl(Core core, FreenetInterface freenetInterface) {
- this(core, freenetInterface, new SoneParser(core));
- }
-
- /**
- * Creates a new Sone downloader.
- *
- * @param core
- * The core
- * @param freenetInterface
- * The Freenet interface
* @param soneParser
*/
- @VisibleForTesting
+ @Inject
SoneDownloaderImpl(Core core, FreenetInterface freenetInterface, SoneParser soneParser) {
super("Sone Downloader", false);
this.core = core;
sone, key, newKnownGood, newSlotToo));
if (edition > sone.getLatestEdition()) {
sone.setLatestEdition(edition);
- new Thread(fetchSoneAction(sone),
+ new Thread(fetchSoneAsSskAction(sone),
"Sone Downloader").start();
}
}
return (currentTimeMillis() - sone.getTime()) < DAYS.toMillis(7);
}
- private void fetchSone(Sone sone) {
+ private void fetchSoneAsSsk(Sone sone) {
fetchSone(sone, sone.getRequestUri().sskForUSK(), false);
}
}
@Override
- public Runnable fetchSoneWithUriAction(final Sone sone) {
+ public Runnable fetchSoneAsUskAction(final Sone sone) {
return new Runnable() {
@Override
public void run() {
}
@Override
- public Runnable fetchSoneAction(final Sone sone) {
+ public Runnable fetchSoneAsSskAction(final Sone sone) {
return new Runnable() {
@Override
public void run() {
- fetchSone(sone);
+ fetchSoneAsSsk(sone);
}
};
}