Expose lots of constructors and accessors
[jFCPlib.git] / src / main / java / net / pterodactylus / fcp / AddPeer.java
index f098106..696a017 100644 (file)
@@ -46,6 +46,11 @@ public class AddPeer extends FcpMessage {
                setField("File", file);
        }
 
+       public AddPeer(String identifier, String file) {
+               this(file);
+               setField("Identifier", identifier);
+       }
+
        /**
         * Creates a new “AddPeer” request that reads the noderef of the peer from
         * the given URL.
@@ -58,6 +63,11 @@ public class AddPeer extends FcpMessage {
                setField("URL", String.valueOf(url));
        }
 
+       public AddPeer(String identifier, URL url) {
+               this(url);
+               setField("Identifier", identifier);
+       }
+
        /**
         * Creates a new “AddPeer” request that adds the peer given by the noderef.
         *
@@ -69,6 +79,11 @@ public class AddPeer extends FcpMessage {
                setNodeRef(nodeRef);
        }
 
+       public AddPeer(String identifier, NodeRef nodeRef) {
+               this(nodeRef);
+               setField("Identifier", identifier);
+       }
+
        //
        // PRIVATE METHODS
        //