X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Ffcp%2FGetNode.java;h=0a84acf30d91fc136f8f871eb399224ab053a56e;hb=05e52ccf3f6e8f2645031cfd3b35f3f71d3a2b82;hp=799b44bd3271dc2b4b9b018ccfdba928afcde8a9;hpb=508624458578f01a393f8b44f32b98b40054fdc8;p=jFCPlib.git diff --git a/src/main/java/net/pterodactylus/fcp/GetNode.java b/src/main/java/net/pterodactylus/fcp/GetNode.java index 799b44b..0a84acf 100644 --- a/src/main/java/net/pterodactylus/fcp/GetNode.java +++ b/src/main/java/net/pterodactylus/fcp/GetNode.java @@ -27,17 +27,18 @@ package net.pterodactylus.fcp; public class GetNode extends FcpMessage { /** - * Creates a “GetNode” command that returns the darknet noderef of the node. + * Creates a “GetNode” command that returns the darknet noderef of the + * node. */ public GetNode() { this(null, null, null); } /** - * Creates a “GetNode” command that returns the request noderef of the node, - * including private and volatile data, if requested. If any of the Boolean - * parameters are null the parameter is ignored and the node’s - * default value is used. + * Creates a “GetNode” command that returns the request noderef of the + * node, including private and volatile data, if requested. If any of the + * Boolean parameters are null the parameter is ignored and + * the node’s default value is used. * * @param giveOpennetRef * true to request the opennet noderef, @@ -48,7 +49,14 @@ public class GetNode extends FcpMessage { * true to include volatile data in the noderef */ public GetNode(Boolean giveOpennetRef, Boolean withPrivate, Boolean withVolatile) { + this(null, giveOpennetRef, withPrivate, withVolatile); + } + + public GetNode(String identifier, Boolean giveOpennetRef, Boolean withPrivate, Boolean withVolatile) { super("GetNode"); + if (identifier != null) { + setField("Identifier", identifier); + } if (giveOpennetRef != null) { setField("GiveOpennetRef", String.valueOf(giveOpennetRef)); }