X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FFcpInterface.java;fp=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FFcpInterface.java;h=0b0dcb97d2c93fd423570363df38fe481494777e;hb=83e875756e1a2afdcedba937734500ef1e452069;hp=02d84ccc2aad2cf1bdd377d269e5c6fa76706194;hpb=5c9eb8d3f8ae565621837ff6eaa300dfdfaff04b;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java b/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java index 02d84cc..0b0dcb9 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java +++ b/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java @@ -39,6 +39,7 @@ import freenet.pluginmanager.PluginReplySender; import freenet.support.SimpleFieldSet; import freenet.support.api.Bucket; +import com.google.common.annotations.VisibleForTesting; /** * Implementation of an FCP interface for other clients or plugins to * communicate with Sone. @@ -106,6 +107,11 @@ public class FcpInterface { // ACCESSORS // + @VisibleForTesting + void addCommand(String name, AbstractSoneCommand command) { + commands.put(name, command); + } + /** * Sets whether the FCP interface should handle requests. If {@code active} * is {@code false}, all requests are answered with an error.