[freenet-cvs] r19343 - trunk/apps/jFCPlib/src/net/pterodactylus/fcp

bombe at freenetproject.org bombe at freenetproject.org
Tue Apr 15 06:46:12 UTC 2008


Author: bombe
Date: 2008-04-15 06:46:12 +0000 (Tue, 15 Apr 2008)
New Revision: 19343

Modified:
   trunk/apps/jFCPlib/src/net/pterodactylus/fcp/EndListPeers.java
   trunk/apps/jFCPlib/src/net/pterodactylus/fcp/ListPeers.java
   trunk/apps/jFCPlib/src/net/pterodactylus/fcp/Peer.java
Log:
 r13 at natrium:  bombe | 2008-04-15 08:41:15 +0200
 add identifier to requests


Modified: trunk/apps/jFCPlib/src/net/pterodactylus/fcp/EndListPeers.java
===================================================================
--- trunk/apps/jFCPlib/src/net/pterodactylus/fcp/EndListPeers.java	2008-04-15 06:30:42 UTC (rev 19342)
+++ trunk/apps/jFCPlib/src/net/pterodactylus/fcp/EndListPeers.java	2008-04-15 06:46:12 UTC (rev 19343)
@@ -37,4 +37,13 @@
 		super(receivedMessage);
 	}
 
+	/**
+	 * Returns the identifier of the request.
+	 * 
+	 * @return The identifier of the request
+	 */
+	public String getIdentifier() {
+		return getField("Identifier");
+	}
+
 }

Modified: trunk/apps/jFCPlib/src/net/pterodactylus/fcp/ListPeers.java
===================================================================
--- trunk/apps/jFCPlib/src/net/pterodactylus/fcp/ListPeers.java	2008-04-15 06:30:42 UTC (rev 19342)
+++ trunk/apps/jFCPlib/src/net/pterodactylus/fcp/ListPeers.java	2008-04-15 06:46:12 UTC (rev 19343)
@@ -30,14 +30,19 @@
 	/**
 	 * Creates a new “ListPeers” request that only includes basic data of the
 	 * peers.
+	 * 
+	 * @param identifier
+	 *            The identifier of the request
 	 */
-	public ListPeers() {
-		this(false, false);
+	public ListPeers(String identifier) {
+		this(identifier, false, false);
 	}
 
 	/**
 	 * Creates a new “ListPeers” request that includes wanted data of the peers.
 	 * 
+	 * @param identifier
+	 *            The identifier of the request
 	 * @param withMetadata
 	 *            If <code>true</code> metadata of the peers is included in
 	 *            the reply
@@ -45,8 +50,9 @@
 	 *            if <code>true</code> volatile data of the peers is included
 	 *            in the reply
 	 */
-	public ListPeers(boolean withMetadata, boolean withVolatile) {
+	public ListPeers(String identifier, boolean withMetadata, boolean withVolatile) {
 		super("ListPeers");
+		setField("Identifier", identifier);
 		setField("WithMetadata", String.valueOf(withMetadata));
 		setField("WithVolatile", String.valueOf(withVolatile));
 	}

Modified: trunk/apps/jFCPlib/src/net/pterodactylus/fcp/Peer.java
===================================================================
--- trunk/apps/jFCPlib/src/net/pterodactylus/fcp/Peer.java	2008-04-15 06:30:42 UTC (rev 19342)
+++ trunk/apps/jFCPlib/src/net/pterodactylus/fcp/Peer.java	2008-04-15 06:46:12 UTC (rev 19343)
@@ -59,6 +59,15 @@
 	}
 
 	/**
+	 * Returns the identifier of the request.
+	 * 
+	 * @return The identifier of the request
+	 */
+	public String getIdentifier() {
+		return getField("Identifier");
+	}
+
+	/**
 	 * Returns the “physical.udp” line from the message. It contains all IP
 	 * addresses and port numbers of the peer.
 	 * 




More information about the cvs mailing list