Author: toad
Date: 2006-12-13 22:59:09 +0000 (Wed, 13 Dec 2006)
New Revision: 11388
Added:
trunk/freenet/src/freenet/plugin/api/NeedsSimpleKeyFetch.java
trunk/freenet/src/freenet/plugin/api/ProvidesSimpleKeyFetch.java
trunk/freenet/src/freenet/support/api/PluginFetchException.java
trunk/freenet/src/freenet/support/api/PluginFreenetURI.java
Log:
First parts of simple key fetching API.
Added: trunk/freenet/src/freenet/plugin/api/NeedsSimpleKeyFetch.java
===================================================================
--- trunk/freenet/src/freenet/plugin/api/NeedsSimpleKeyFetch.java
(rev 0)
+++ trunk/freenet/src/freenet/plugin/api/NeedsSimpleKeyFetch.java
2006-12-13 22:59:09 UTC (rev 11388)
@@ -0,0 +1,9 @@
+package freenet.plugin.api;
+
+/**
+ * Indicates that the plugin requires the ability to fetch keys.
+ * Simple version of the interface.
+ */
+public interface NeedsSimpleKeyFetch {
+
+}
Added: trunk/freenet/src/freenet/plugin/api/ProvidesSimpleKeyFetch.java
===================================================================
--- trunk/freenet/src/freenet/plugin/api/ProvidesSimpleKeyFetch.java
(rev 0)
+++ trunk/freenet/src/freenet/plugin/api/ProvidesSimpleKeyFetch.java
2006-12-13 22:59:09 UTC (rev 11388)
@@ -0,0 +1,15 @@
+package freenet.plugin.api;
+
+import freenet.support.api.Bucket;
+import freenet.support.api.PluginFetchException;
+import freenet.support.api.PluginFreenetURI;
+
+/**
+ * Provides an interface to the client for it to fetch keys from.
+ * Simple version of the interface.
+ */
+public interface ProvidesSimpleKeyFetch {
+
+ public Bucket fetch(PluginFreenetURI uri) throws PluginFetchException;
+
+}
Added: trunk/freenet/src/freenet/support/api/PluginFetchException.java
===================================================================
--- trunk/freenet/src/freenet/support/api/PluginFetchException.java
(rev 0)
+++ trunk/freenet/src/freenet/support/api/PluginFetchException.java
2006-12-13 22:59:09 UTC (rev 11388)
@@ -0,0 +1,8 @@
+package freenet.support.api;
+
+/**
+ * Base class of exceptions thrown when a plugin fetch fails.
+ */
+public abstract class PluginFetchException extends Exception {
+
+}
Added: trunk/freenet/src/freenet/support/api/PluginFreenetURI.java
===================================================================
--- trunk/freenet/src/freenet/support/api/PluginFreenetURI.java
(rev 0)
+++ trunk/freenet/src/freenet/support/api/PluginFreenetURI.java 2006-12-13
22:59:09 UTC (rev 11388)
@@ -0,0 +1,12 @@
+package freenet.support.api;
+
+/**
+ * Base interface of FreenetURI.
+ * Provides an interface for plugins.
+ * Anything inside the node should use FreenetURI directly.
+ * Any dangerous methods should be left out of this interface.
+ * BaseFreenetURI's are constructed via FreenetPluginManager.
+ */
+public interface PluginFreenetURI {
+
+}