update Directory, Fountain, JSReflection, SOAP, XMLRPC to use baskets and new JS...
[org.ibex.js.git] / src / org / ibex / js / Fountain.java
index c015f4c..f1bf14b 100644 (file)
@@ -15,7 +15,7 @@ import org.ibex.net.*;
  *   be totally independent of the others (ie separate stream position
  *   and state) although they draw from the same data source.
  */
-public abstract class Fountain extends JS.O implements JS.Cloneable {
+public abstract class Fountain extends JS.Immutable implements JS.Cloneable {
 
     // Public Interface //////////////////////////////////////////////////////////////////////////////
 
@@ -23,8 +23,7 @@ public abstract class Fountain extends JS.O implements JS.Cloneable {
     public static class NotCacheableException extends Exception { }
 
     // streams are "sealed" by default to prevent accidental object leakage
-    public void put(Object key, Object val) { }
-    private Cache getCache = new Cache(100);
+    private Cache getCache = new Cache(100, true);
     protected Object _get(Object key) { return null; }
     public final Object get(Object key) {
         Object ret = getCache.get(key);
@@ -43,7 +42,7 @@ public abstract class Fountain extends JS.O implements JS.Cloneable {
         //public String toString() { return "Stream.HTTP:" + url; }
         public HTTP(String url) { while (url.endsWith("/")) url = url.substring(0, url.length() - 1); this.url = url; }
         public Object _get(Object key) { return new HTTP(url + "/" + (String)key); }
-        public String getCacheKey(Vec path) throws NotCacheableException { return url; }
+        public String getCacheKey(Basket.List path) throws NotCacheableException { return url; }
         public InputStream getInputStream() throws IOException { return new org.ibex.net.HTTP(url).GET(null, null); }
     }