You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2021/11/02 09:45:49 UTC

[GitHub] [incubator-eventmesh] ruanwenjun commented on a change in pull request #575: [ISSUE #563] SDK SUPPORT CLOUD EVENT

ruanwenjun commented on a change in pull request #575:
URL: https://github.com/apache/incubator-eventmesh/pull/575#discussion_r740877675



##########
File path: eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/ReceiveMsgHook.java
##########
@@ -20,6 +20,13 @@
 import io.netty.channel.ChannelHandlerContext;
 import org.apache.eventmesh.common.protocol.tcp.Package;
 
-public interface ReceiveMsgHook {
+/**
+ * ReceiveMsgHook.
+ *
+ * @param <T> receive message type.
+ */
+public interface ReceiveMsgHook<T> {
     void handle(Package msg, ChannelHandlerContext ctx);
+
+    T convert(Package pkg);

Review comment:
       If this method just execute by itself, it's not suggested to add this in interface. This will make interface unclear.

##########
File path: eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/Header.java
##########
@@ -17,21 +17,32 @@
 
 package org.apache.eventmesh.common.protocol.tcp;
 
+import java.util.HashMap;
+import java.util.Map;
+
 public class Header {
 
     private Command cmd;
     private int code;
-    private String msg;
+    private String dsec;

Review comment:
       What is `dsec` mean? `desc`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org