From 6e19b7c8e21d9b0b36cfaf95dfc3c5e57b6ca915 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 8 Apr 2011 14:26:02 +0200 Subject: [PATCH] Add javadoc. --- .../sone/freenet/fcp/FcpInterface.java | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/freenet/fcp/FcpInterface.java b/src/main/java/net/pterodactylus/sone/freenet/fcp/FcpInterface.java index 6fc4866..3657f8f 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/fcp/FcpInterface.java +++ b/src/main/java/net/pterodactylus/sone/freenet/fcp/FcpInterface.java @@ -24,6 +24,7 @@ import java.util.Map; import net.pterodactylus.sone.core.Core; import net.pterodactylus.sone.freenet.fcp.Command.AccessType; import net.pterodactylus.sone.freenet.fcp.Command.Reply; +import freenet.pluginmanager.FredPluginFCP; import freenet.pluginmanager.PluginNotFoundException; import freenet.pluginmanager.PluginReplySender; import freenet.support.SimpleFieldSet; @@ -37,15 +38,38 @@ import freenet.support.api.Bucket; */ public class FcpInterface { + /** The core. */ private final Core core; + + /** All available FCP commands. */ private final Map commands = Collections.synchronizedMap(new HashMap()); + /** + * Creates a new FCP interface. + * + * @param core + * The core + */ public FcpInterface(Core core) { this.core = core; commands.put("Version", new VersionCommand()); commands.put("GetPostFeed", new GetPostFeedCommand(core)); } + /** + * Handles a plugin FCP request. + * + * @param pluginReplySender + * The reply sender + * @param parameters + * The message parameters + * @param data + * The message data (may be {@code null}) + * @param accessType + * One of {@link FredPluginFCP#ACCESS_DIRECT}, + * {@link FredPluginFCP#ACCESS_FCP_FULL}, + * {@link FredPluginFCP#ACCESS_FCP_RESTRICTED} + */ public void handle(PluginReplySender pluginReplySender, SimpleFieldSet parameters, Bucket data, int accessType) { Command command = commands.get(parameters.get("Message")); if (command == null) { -- 2.7.4