1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.universAAL.ri.gateway.communicator.service;
22
23 import java.io.Serializable;
24
25
26
27
28
29
30
31 public class Message implements Serializable {
32
33
34
35
36 private static final long serialVersionUID = -2259161945843015685L;
37
38
39
40
41 private Object content;
42
43 private String remoteProxyRegistrationId;
44
45 private String remoteMemberId;
46
47
48
49
50
51
52
53 public Message(final Object content) {
54 this.content = content;
55 }
56
57
58
59
60
61
62 public Object getContent() {
63 return content;
64 }
65
66 @Override
67 public String toString() {
68 if (content != null) {
69 return "content: " + content.toString();
70 } else {
71 return "content: " + "null";
72 }
73 }
74
75 @Override
76 public boolean equals(final Object obj) {
77 if (obj == null || !(obj instanceof Message)) {
78 return false;
79 }
80 Message o = (Message) obj;
81 if (content == null && o.content == null) {
82 return true;
83 }
84 return content.equals(o.content);
85 }
86
87 @Override
88 public int hashCode() {
89 if (content == null) {
90 return 0;
91 }
92 return content.hashCode();
93 }
94
95 public String getRemoteProxyRegistrationId() {
96 return remoteProxyRegistrationId;
97 }
98
99 public void setRemoteProxyRegistrationId(String remoteProxyRegistrationId) {
100 this.remoteProxyRegistrationId = remoteProxyRegistrationId;
101 }
102
103 public String getRemoteMemberId() {
104 return remoteMemberId;
105 }
106
107 public void setRemoteMemberId(String remoteMemberId) {
108 this.remoteMemberId = remoteMemberId;
109 }
110
111 }