Author: nextgens
Date: 2007-04-12 13:10:26 +0000 (Thu, 12 Apr 2007)
New Revision: 12600
Modified:
trunk/freenet/src/freenet/node/fcp/FCPMessage.java
trunk/freenet/src/freenet/node/fcp/TestDDACompleteMessage.java
trunk/freenet/src/freenet/node/fcp/TestDDAReplyMessage.java
trunk/freenet/src/freenet/node/fcp/TestDDARequestMessage.java
trunk/freenet/src/freenet/node/fcp/TestDDAResponseMessage.java
Log:
more naming consistency fixes
Modified: trunk/freenet/src/freenet/node/fcp/FCPMessage.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/FCPMessage.java 2007-04-12 12:53:45 UTC
(rev 12599)
+++ trunk/freenet/src/freenet/node/fcp/FCPMessage.java 2007-04-12 13:10:26 UTC
(rev 12600)
@@ -77,10 +77,10 @@
return new ShutdownMessage();
if(name.equals(SubscribeUSKMessage.name))
return new SubscribeUSKMessage(fs);
- if(name.equals(TestDDARequest.NAME))
- return new TestDDARequest(fs);
- if(name.equals(TestDDAResponse.NAME))
- return new TestDDAResponse(fs);
+ if(name.equals(TestDDARequestMessage.name))
+ return new TestDDARequestMessage(fs);
+ if(name.equals(TestDDAResponseMessage.name))
+ return new TestDDAResponseMessage(fs);
if(name.equals(WatchGlobal.name))
return new WatchGlobal(fs);
if(name.equals("Void"))
Modified: trunk/freenet/src/freenet/node/fcp/TestDDACompleteMessage.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/TestDDACompleteMessage.java
2007-04-12 12:53:45 UTC (rev 12599)
+++ trunk/freenet/src/freenet/node/fcp/TestDDACompleteMessage.java
2007-04-12 13:10:26 UTC (rev 12600)
@@ -22,7 +22,7 @@
*
*/
public class TestDDACompleteMessage extends FCPMessage {
- public static String NAME = "TestDDAComplete";
+ public static String name = "TestDDAComplete";
public static String READ_ALLOWED = "ReadAllowed";
public static String WRITE_ALLOWED = "WriteAllowed";
@@ -79,10 +79,10 @@
}
public String getName() {
- return NAME;
+ return name;
}
public void run(FCPConnectionHandler handler, Node node) throws
MessageInvalidException {
- throw new
MessageInvalidException(ProtocolErrorMessage.INVALID_MESSAGE, NAME + " goes
from server to client not the other way around", NAME, false);
+ throw new
MessageInvalidException(ProtocolErrorMessage.INVALID_MESSAGE, name + " goes
from server to client not the other way around", name, false);
}
}
Modified: trunk/freenet/src/freenet/node/fcp/TestDDAReplyMessage.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/TestDDAReplyMessage.java 2007-04-12
12:53:45 UTC (rev 12599)
+++ trunk/freenet/src/freenet/node/fcp/TestDDAReplyMessage.java 2007-04-12
13:10:26 UTC (rev 12600)
@@ -17,7 +17,7 @@
*
*/
public class TestDDAReplyMessage extends FCPMessage {
- public static final String NAME = "TestDDAReply";
+ public static final String name = "TestDDAReply";
public static final String READ_FILENAME = "ReadFilename";
public static final String WRITE_FILENAME = "WriteFilename";
public static final String CONTENT_TO_WRITE = "ContentToWrite";
@@ -45,10 +45,10 @@
}
public String getName() {
- return NAME;
+ return name;
}
public void run(FCPConnectionHandler handler, Node node) throws
MessageInvalidException {
- throw new
MessageInvalidException(ProtocolErrorMessage.INVALID_MESSAGE, NAME + " goes
from server to client not the other way around", NAME, false);
+ throw new
MessageInvalidException(ProtocolErrorMessage.INVALID_MESSAGE, name + " goes
from server to client not the other way around", name, false);
}
}
Modified: trunk/freenet/src/freenet/node/fcp/TestDDARequestMessage.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/TestDDARequestMessage.java
2007-04-12 12:53:45 UTC (rev 12599)
+++ trunk/freenet/src/freenet/node/fcp/TestDDARequestMessage.java
2007-04-12 13:10:26 UTC (rev 12600)
@@ -16,7 +16,7 @@
* @author Florent Daignière <nextgens at freenetproject.org>
*/
public class TestDDARequestMessage extends FCPMessage {
- public static final String NAME = "TestDDARequest";
+ public static final String name = "TestDDARequest";
public static final String DIRECTORY = "Directory";
public static final String WANT_READ = "WantRead";
public static final String WANT_WRITE = "WantWrite";
@@ -46,7 +46,7 @@
}
public String getName() {
- return NAME;
+ return name;
}
public void run(FCPConnectionHandler handler, Node node) throws
MessageInvalidException {
Modified: trunk/freenet/src/freenet/node/fcp/TestDDAResponseMessage.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/TestDDAResponseMessage.java
2007-04-12 12:53:45 UTC (rev 12599)
+++ trunk/freenet/src/freenet/node/fcp/TestDDAResponseMessage.java
2007-04-12 13:10:26 UTC (rev 12600)
@@ -17,7 +17,7 @@
*
*/
public class TestDDAResponseMessage extends FCPMessage {
- public static final String NAME = "TestDDAResponse";
+ public static final String name = "TestDDAResponse";
public static final String READ_CONTENT = "ReadContent";
final String identifier;
@@ -38,7 +38,7 @@
}
public String getName() {
- return NAME;
+ return name;
}
public void run(FCPConnectionHandler handler, Node node) throws
MessageInvalidException {
@@ -51,7 +51,7 @@
if(job == null)
throw new
MessageInvalidException(ProtocolErrorMessage.INVALID_MESSAGE, "The node doesn't
know that testDDA identifier! double check it! (" + identifier + ").",
identifier, false);
else if((job.readFilename != null) && (readContent == null))
- throw new
MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "You need to send "
+ READ_CONTENT + " back to the node if you specify " +
TestDDARequestMessage.WANT_READ + " in " + TestDDARequestMessage.NAME + '.',
identifier, false);
+ throw new
MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "You need to send "
+ READ_CONTENT + " back to the node if you specify " +
TestDDARequestMessage.WANT_READ + " in " + TestDDARequestMessage.name + '.',
identifier, false);
TestDDACompleteMessage reply = new
TestDDACompleteMessage(handler, job, readContent);
handler.outputHandler.queue(reply);