1 25 26 package org.snipsnap.xmlrpc; 27 28 import org.snipsnap.util.Weblog; 29 import org.snipsnap.util.WeblogQueue; 30 31 import java.util.List ; 32 33 40 41 public class SnipSnapPing { 42 private static SnipSnapPing instance; 43 private WeblogQueue changed; 44 45 public static synchronized SnipSnapPing getInstance() { 46 if (null == instance) { 47 instance = new SnipSnapPing(); 48 } 49 return instance; 50 } 51 52 public SnipSnapPing() { 53 changed = new WeblogQueue(10); 54 } 55 56 public synchronized void addChangedWeblog(String name, String url) { 57 changed.add(new Weblog(name, url)); 58 } 59 60 public List getChanged(int count) { 61 return changed.get(count); 62 } 63 } 64 | Popular Tags |