projects
/
Sone.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9974554
)
Rename Command.Reply to Command.Response.
author
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Fri, 8 Apr 2011 14:03:03 +0000
(16:03 +0200)
committer
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Fri, 8 Apr 2011 14:03:03 +0000
(16:03 +0200)
src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java
patch
|
blob
|
history
src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java
patch
|
blob
|
history
src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java
patch
|
blob
|
history
src/main/java/net/pterodactylus/sone/fcp/VersionCommand.java
patch
|
blob
|
history
src/main/java/net/pterodactylus/sone/freenet/fcp/Command.java
patch
|
blob
|
history
diff --git
a/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java
b/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java
index
81928dd
..
3a64bbf
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java
+++ b/
src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java
@@
-25,7
+25,7
@@
import net.pterodactylus.sone.core.Core;
import net.pterodactylus.sone.freenet.fcp.Command;
import net.pterodactylus.sone.freenet.fcp.FcpException;
import net.pterodactylus.sone.freenet.fcp.Command.AccessType;
import net.pterodactylus.sone.freenet.fcp.Command;
import net.pterodactylus.sone.freenet.fcp.FcpException;
import net.pterodactylus.sone.freenet.fcp.Command.AccessType;
-import net.pterodactylus.sone.freenet.fcp.Command.Re
ply
;
+import net.pterodactylus.sone.freenet.fcp.Command.Re
sponse
;
import freenet.pluginmanager.FredPluginFCP;
import freenet.pluginmanager.PluginNotFoundException;
import freenet.pluginmanager.PluginReplySender;
import freenet.pluginmanager.FredPluginFCP;
import freenet.pluginmanager.PluginNotFoundException;
import freenet.pluginmanager.PluginReplySender;
@@
-81,7
+81,7
@@
public class FcpInterface {
return;
}
try {
return;
}
try {
- Re
ply
reply = command.execute(parameters, data, AccessType.values()[accessType]);
+ Re
sponse
reply = command.execute(parameters, data, AccessType.values()[accessType]);
SimpleFieldSet replyParameters = reply.getReplyParameters();
replyParameters.putOverwrite("Identifier", identifier);
if (reply.hasData()) {
SimpleFieldSet replyParameters = reply.getReplyParameters();
replyParameters.putOverwrite("Identifier", identifier);
if (reply.hasData()) {
diff --git
a/src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java
b/src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java
index
5d44bef
..
1054f76
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java
+++ b/
src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java
@@
-44,8
+44,8
@@
public class GetLocalSonesCommand extends AbstractSoneCommand {
* {@inheritDoc}
*/
@Override
* {@inheritDoc}
*/
@Override
- public Re
ply
execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
- return new Re
ply
(encodeSones(getCore().getLocalSones()));
+ public Re
sponse
execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
+ return new Re
sponse
(encodeSones(getCore().getLocalSones()));
}
}
}
}
diff --git
a/src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java
b/src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java
index
2dc59a1
..
38b240a
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java
+++ b/
src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java
@@
-53,7
+53,7
@@
public class GetPostFeedCommand extends AbstractSoneCommand {
* {@inheritDoc}
*/
@Override
* {@inheritDoc}
*/
@Override
- public Re
ply
execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
+ public Re
sponse
execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
Sone sone = getSone(parameters, "Sone");
int startPost = getInt(parameters, "StartPost", 0);
int maxPosts = getInt(parameters, "MaxPosts", -1);
Sone sone = getSone(parameters, "Sone");
int startPost = getInt(parameters, "StartPost", 0);
int maxPosts = getInt(parameters, "MaxPosts", -1);
@@
-73,10
+73,10
@@
public class GetPostFeedCommand extends AbstractSoneCommand {
Collections.sort(sortedPosts, Post.TIME_COMPARATOR);
if (sortedPosts.size() < startPost) {
Collections.sort(sortedPosts, Post.TIME_COMPARATOR);
if (sortedPosts.size() < startPost) {
- return new Re
ply
(encodePosts(Collections.<Post> emptyList()));
+ return new Re
sponse
(encodePosts(Collections.<Post> emptyList()));
}
}
- return new Re
ply
(encodePosts(sortedPosts.subList(startPost, (maxPosts == -1) ? sortedPosts.size() : Math.min(startPost + maxPosts, sortedPosts.size()))));
+ return new Re
sponse
(encodePosts(sortedPosts.subList(startPost, (maxPosts == -1) ? sortedPosts.size() : Math.min(startPost + maxPosts, sortedPosts.size()))));
}
}
}
}
diff --git
a/src/main/java/net/pterodactylus/sone/fcp/VersionCommand.java
b/src/main/java/net/pterodactylus/sone/fcp/VersionCommand.java
index
89c5c3c
..
ff57c40
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/fcp/VersionCommand.java
+++ b/
src/main/java/net/pterodactylus/sone/fcp/VersionCommand.java
@@
-34,8
+34,8
@@
public class VersionCommand implements Command {
* {@inheritDoc}
*/
@Override
* {@inheritDoc}
*/
@Override
- public Re
ply
execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) {
- return new Re
ply
(new SimpleFieldSetBuilder().put("Version", SonePlugin.VERSION.toString()).put("ProtocolVersion", 1).get());
+ public Re
sponse
execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) {
+ return new Re
sponse
(new SimpleFieldSetBuilder().put("Version", SonePlugin.VERSION.toString()).put("ProtocolVersion", 1).get());
}
}
}
}
diff --git
a/src/main/java/net/pterodactylus/sone/freenet/fcp/Command.java
b/src/main/java/net/pterodactylus/sone/freenet/fcp/Command.java
index
07fb7a4
..
faa10db
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/freenet/fcp/Command.java
+++ b/
src/main/java/net/pterodactylus/sone/freenet/fcp/Command.java
@@
-42,7
+42,7
@@
public interface Command {
* @throws FcpException
* if an error processing the parameters occurs
*/
* @throws FcpException
* if an error processing the parameters occurs
*/
- public Re
ply
execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException;
+ public Re
sponse
execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException;
/**
* The access type of the request.
/**
* The access type of the request.
@@
-67,7
+67,7
@@
public interface Command {
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
- public static class Re
ply
{
+ public static class Re
sponse
{
/** The reply parameters. */
private final SimpleFieldSet replyParameters;
/** The reply parameters. */
private final SimpleFieldSet replyParameters;
@@
-84,7
+84,7
@@
public interface Command {
* @param replyParameters
* The reply parameters
*/
* @param replyParameters
* The reply parameters
*/
- public Re
ply
(SimpleFieldSet replyParameters) {
+ public Re
sponse
(SimpleFieldSet replyParameters) {
this(replyParameters, null, null);
}
this(replyParameters, null, null);
}
@@
-96,7
+96,7
@@
public interface Command {
* @param data
* The data of the reply (may be {@code null})
*/
* @param data
* The data of the reply (may be {@code null})
*/
- public Re
ply
(SimpleFieldSet replyParameters, byte[] data) {
+ public Re
sponse
(SimpleFieldSet replyParameters, byte[] data) {
this(replyParameters, data, null);
}
this(replyParameters, data, null);
}
@@
-108,7
+108,7
@@
public interface Command {
* @param bucket
* The bucket of the reply (may be {@code null})
*/
* @param bucket
* The bucket of the reply (may be {@code null})
*/
- public Re
ply
(SimpleFieldSet replyParameters, Bucket bucket) {
+ public Re
sponse
(SimpleFieldSet replyParameters, Bucket bucket) {
this(replyParameters, null, bucket);
}
this(replyParameters, null, bucket);
}
@@
-122,7
+122,7
@@
public interface Command {
* @param bucket
* The bucket of the reply (may be {@code null})
*/
* @param bucket
* The bucket of the reply (may be {@code null})
*/
- private Re
ply
(SimpleFieldSet replyParameters, byte[] data, Bucket bucket) {
+ private Re
sponse
(SimpleFieldSet replyParameters, byte[] data, Bucket bucket) {
this.replyParameters = replyParameters;
this.data = data;
this.bucket = bucket;
this.replyParameters = replyParameters;
this.data = data;
this.bucket = bucket;