|
@@ -0,0 +1,81 @@
|
|
1
|
+public class Message {
|
|
2
|
+
|
|
3
|
+ private String sequence;
|
|
4
|
+ private String timestamp;
|
|
5
|
+ private String fromid;
|
|
6
|
+ private String toid;
|
|
7
|
+ private String message;
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+ public Message() throws UnirestException {
|
|
12
|
+ }
|
|
13
|
+
|
|
14
|
+ public Message(String sequence, String timestamp, String fromId, String toid, String message) {
|
|
15
|
+ this.sequence = sequence;
|
|
16
|
+ this.timestamp = timestamp;
|
|
17
|
+ this.fromid = fromId;
|
|
18
|
+ this.toid = toid;
|
|
19
|
+ this.message = message;
|
|
20
|
+ }
|
|
21
|
+
|
|
22
|
+ public Message(String fromId, String toid, String message) {
|
|
23
|
+ this.fromid = fromId;
|
|
24
|
+ this.toid = toid;
|
|
25
|
+ this.message = message;
|
|
26
|
+ }
|
|
27
|
+
|
|
28
|
+ public String getSequence() {
|
|
29
|
+ return sequence;
|
|
30
|
+ }
|
|
31
|
+
|
|
32
|
+ public void setSequence(String sequence) {
|
|
33
|
+ this.sequence = sequence;
|
|
34
|
+ }
|
|
35
|
+
|
|
36
|
+ public String getTimestamp() {
|
|
37
|
+ return timestamp;
|
|
38
|
+ }
|
|
39
|
+
|
|
40
|
+ public void setTimestamp(String timestamp) {
|
|
41
|
+ this.timestamp = timestamp;
|
|
42
|
+ }
|
|
43
|
+
|
|
44
|
+ public String getFromid() {
|
|
45
|
+ return fromid;
|
|
46
|
+ }
|
|
47
|
+
|
|
48
|
+ public void setFromid(String fromid) {
|
|
49
|
+ this.fromid = fromid;
|
|
50
|
+ }
|
|
51
|
+
|
|
52
|
+ public String getToid() {
|
|
53
|
+ return toid;
|
|
54
|
+ }
|
|
55
|
+
|
|
56
|
+ public void setToid(String toid) {
|
|
57
|
+ this.toid = toid;
|
|
58
|
+ }
|
|
59
|
+
|
|
60
|
+ public String getMessage() {
|
|
61
|
+ return message;
|
|
62
|
+ }
|
|
63
|
+
|
|
64
|
+ public void setMessage(String message) {
|
|
65
|
+ this.message = message;
|
|
66
|
+ }
|
|
67
|
+
|
|
68
|
+ @Override
|
|
69
|
+ public String toString() {
|
|
70
|
+ return "Message{" +
|
|
71
|
+ "sequence:'" + sequence + '\'' +
|
|
72
|
+ ", timestamp:'" + timestamp + '\'' +
|
|
73
|
+ ", fromid:'" + fromid + '\'' +
|
|
74
|
+ ", toid:'" + toid + '\'' +
|
|
75
|
+ ", message:'" + message + '\'' +
|
|
76
|
+ '}';
|
|
77
|
+ }
|
|
78
|
+
|
|
79
|
+ private class UnirestException extends Exception {
|
|
80
|
+ }
|
|
81
|
+}
|