xiaoyong931011
2021-03-15 dfa29cdf223f2cb78184c4b15ab9f0824f3427c4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
package com.matrix.component.websoket;
 
import net.sf.json.JSONObject;
 
/**
 * websoket通用消息格式
 */
public class WebSoketCommonMessage {
 
 
    /**
     * 点对点消息
     */
    public static final int MESSAGE_TYPE_P2P=1;
    /**
     * 消息广播
     */
    public static final int MESSAGE_TYPE_GROUP=2;
 
    /**
     * 上传消息
     */
    public static final int MESSAGE_TYPE_UP=3;
 
    /**
     * 下发消息
     */
    public static final int MESSAGE_TYPE_DOWN=4;
 
 
 
    /**
     * 微服务名称
     */
    private  String serviceName;
 
    /**
     * 系统环境标识
     */
    private String evn;
 
    /**
     * 发送用户id
     */
    private String userId;
 
    /**
     * 目标用户id
     */
    private  String targetUserId;
 
    /**
     * 消息体
     */
    private String messageBody;
 
    /**
     * 消息类型
     */
    private Integer messageType;
 
    public String getServiceName() {
        return serviceName;
    }
 
    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }
 
    public String getEvn() {
        return evn;
    }
 
    public void setEvn(String evn) {
        this.evn = evn;
    }
 
    public String getUserId() {
        return userId;
    }
 
    public void setUserId(String userId) {
        this.userId = userId;
    }
 
    public String getTargetUserId() {
        return targetUserId;
    }
 
    public void setTargetUserId(String targetUserId) {
        this.targetUserId = targetUserId;
    }
 
    public String getMessageBody() {
        return messageBody;
    }
 
    public void setMessageBody(String messageBody) {
        this.messageBody = messageBody;
    }
 
    public Integer getMessageType() {
        return messageType;
    }
 
    public void setMessageType(Integer messageType) {
        this.messageType = messageType;
    }
 
    @Override
    public String toString() {
        return JSONObject.fromObject(this).toString();
    }
 
 
}