Add method to add remote Sones for watching.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 15 Oct 2010 04:38:16 +0000 (06:38 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 15 Oct 2010 04:38:16 +0000 (06:38 +0200)
src/main/java/net/pterodactylus/sone/core/Core.java

index 3c3a659..ecebbe8 100644 (file)
@@ -160,6 +160,17 @@ public class Core extends AbstractService {
        }
 
        /**
+        * Adds a remote Sone so that it is watched for updates.
+        *
+        * @param sone
+        *            The sone to watch
+        */
+       public void addRemoteSone(Sone sone) {
+               Sone updatedSone = soneCache.put(sone.getId(), sone);
+               soneDownloader.addSone(updatedSone);
+       }
+
+       /**
         * Creates a new Sone at a random location.
         *
         * @param name