X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FSoneDownloader.java;h=decd574577beeceb3479c39c450f2d31ee9955fb;hb=3c4e92547343582aca1fde00f981f029027a1bb4;hp=8b3ad79f14897d4ae426a37e9f3df3f7c1ce4545;hpb=94088d808dfca4bf5464ee4f3b099175fb4c058a;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java index 8b3ad79..decd574 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java @@ -105,18 +105,6 @@ public class SoneDownloader extends AbstractService { } /** - * Removes the given Sone from the downloader. - * - * @param sone - * The Sone to stop watching - */ - public void removeSone(Sone sone) { - if (sones.remove(sone)) { - freenetInterface.unregisterUsk(sone); - } - } - - /** * Fetches the updated Sone. This method is a callback method for * {@link FreenetInterface#registerUsk(Sone, SoneDownloader)}. * @@ -533,6 +521,21 @@ public class SoneDownloader extends AbstractService { } } + public class FetchSoneWithUri implements Runnable { + + private final Sone sone; + + public FetchSoneWithUri(Sone sone) { + this.sone = sone; + } + + @Override + public void run() { + fetchSone(sone, sone.getRequestUri()); + } + + } + public class FetchSone implements Runnable { private final Sone sone; @@ -543,7 +546,7 @@ public class SoneDownloader extends AbstractService { @Override public void run() { - fetchSone(sone, sone.getRequestUri()); + fetchSone(sone); } }