projects
/
jFCPlib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add event for URIGenerated messages on ClientPut command
[jFCPlib.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
fcp
/
GetNode.java
diff --git
a/src/main/java/net/pterodactylus/fcp/GetNode.java
b/src/main/java/net/pterodactylus/fcp/GetNode.java
index
3419860
..
72b90c4
100644
(file)
--- a/
src/main/java/net/pterodactylus/fcp/GetNode.java
+++ b/
src/main/java/net/pterodactylus/fcp/GetNode.java
@@
-18,6
+18,8
@@
package net.pterodactylus.fcp;
package net.pterodactylus.fcp;
+import java.util.Optional;
+
/**
* The “GetNode” command returns the darknet or opennet noderef of the node,
* optionally including private and volatile data.
/**
* The “GetNode” command returns the darknet or opennet noderef of the node,
* optionally including private and volatile data.
@@
-49,7
+51,12
@@
public class GetNode extends FcpMessage {
* <code>true</code> to include volatile data in the noderef
*/
public GetNode(Boolean giveOpennetRef, Boolean withPrivate, Boolean withVolatile) {
* <code>true</code> 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");
super("GetNode");
+ Optional.ofNullable(identifier).ifPresent(i -> setField("Identifier", i));
if (giveOpennetRef != null) {
setField("GiveOpennetRef", String.valueOf(giveOpennetRef));
}
if (giveOpennetRef != null) {
setField("GiveOpennetRef", String.valueOf(giveOpennetRef));
}