diff --git a/src/main/src/org/bdware/server/action/ReplyUtil.java b/src/main/src/org/bdware/server/action/ReplyUtil.java index d0d4839..c1fc7b4 100644 --- a/src/main/src/org/bdware/server/action/ReplyUtil.java +++ b/src/main/src/org/bdware/server/action/ReplyUtil.java @@ -1,6 +1,8 @@ package org.bdware.server.action; +import com.google.gson.JsonObject; import org.bdware.sc.conn.ResultCallback; +import org.bdware.server.nodecenter.Response; import java.util.HashMap; import java.util.Map; @@ -20,4 +22,9 @@ public class ReplyUtil { ret.put("data", data); resultCallback.onResult(ret); } + + public static void injectRequestID(Response response, JsonObject json) { + if (json.has("requestID")) + response.responseID = json.get("requestID").getAsString(); + } } \ No newline at end of file diff --git a/src/main/src/org/bdware/server/nodecenter/Response.java b/src/main/src/org/bdware/server/nodecenter/Response.java index 701bc06..cdc8a51 100644 --- a/src/main/src/org/bdware/server/nodecenter/Response.java +++ b/src/main/src/org/bdware/server/nodecenter/Response.java @@ -1,7 +1,7 @@ package org.bdware.server.nodecenter; public class Response { - String responseID; + public String responseID; public String action; public Object data; public long executeTime;