26
26
import java .util .Objects ;
27
27
28
28
/**
29
+ * 消息创建器
29
30
* @author lorne
30
- * @date 2018/12/2
31
- * @description 消息创建器
32
31
*/
33
32
public class MessageCreator {
34
33
@@ -45,8 +44,8 @@ private static byte[] serialize(Object obj) {
45
44
/**
46
45
* 通知TxClient连接
47
46
*
48
- * @param notifyConnectParams
49
- * @return
47
+ * @param notifyConnectParams notifyConnectParams
48
+ * @return MessageDto
50
49
*/
51
50
public static MessageDto newTxManager (NotifyConnectParams notifyConnectParams ) {
52
51
MessageDto msg = new MessageDto ();
@@ -58,8 +57,8 @@ public static MessageDto newTxManager(NotifyConnectParams notifyConnectParams) {
58
57
/**
59
58
* 提交事务组
60
59
*
61
- * @param notifyUnitParams
62
- * @return
60
+ * @param notifyUnitParams notifyUnitParams
61
+ * @return MessageDto
63
62
*/
64
63
public static MessageDto notifyUnit (NotifyUnitParams notifyUnitParams ) {
65
64
MessageDto msg = new MessageDto ();
@@ -71,8 +70,9 @@ public static MessageDto notifyUnit(NotifyUnitParams notifyUnitParams) {
71
70
72
71
/**
73
72
* 关闭事务组正常响应
74
- *
75
- * @return
73
+ * @param action action
74
+ * @param message message
75
+ * @return MessageDto
76
76
*/
77
77
public static MessageDto notifyGroupOkResponse (Object message ,String action ) {
78
78
MessageDto messageDto = new MessageDto ();
@@ -84,8 +84,9 @@ public static MessageDto notifyGroupOkResponse(Object message,String action) {
84
84
85
85
/**
86
86
* 关闭事务组失败响应
87
- *
88
- * @return
87
+ * @param action action
88
+ * @param message message
89
+ * @return MessageDto
89
90
*/
90
91
public static MessageDto notifyGroupFailResponse (Object message ,String action ) {
91
92
MessageDto messageDto = new MessageDto ();
@@ -97,8 +98,8 @@ public static MessageDto notifyGroupFailResponse(Object message,String action) {
97
98
98
99
/**
99
100
* 服务器错误
100
- *
101
- * @return
101
+ * @param action action
102
+ * @return MessageDto
102
103
*/
103
104
public static MessageDto serverException (String action ) {
104
105
MessageDto messageDto = new MessageDto ();
0 commit comments