40
|
1 package christie.topology;
|
|
2
|
|
3
|
|
4 import org.msgpack.annotation.Message;
|
|
5
|
|
6 @Message
|
|
7 public class HostMessage {
|
50
|
8 public String hostName;
|
40
|
9 public int port;
|
|
10
|
|
11 public String connectionName;
|
64
|
12 public String nodeName; // this is nodeName which have these IP and port.
|
40
|
13
|
|
14 public String reverseName;
|
64
|
15 public String remoteNodeName;
|
40
|
16 public String cookie; // MD5
|
|
17
|
|
18 public boolean alive;
|
|
19
|
|
20 public HostMessage() { }
|
|
21 public HostMessage(String name, int port) {
|
50
|
22 this.hostName = name;
|
40
|
23 this.port = port;
|
|
24 }
|
|
25
|
|
26 public HostMessage(String name, int port, String connectionName, String reverseName) {
|
50
|
27 this.hostName = name;
|
40
|
28 this.port = port;
|
|
29 this.connectionName = connectionName;
|
|
30 this.reverseName = reverseName;
|
|
31 }
|
|
32
|
|
33 public boolean isAlive() {
|
|
34 return alive;
|
|
35 }
|
|
36
|
|
37 public String toString() {
|
50
|
38 return "HostMessage : name = " + hostName + ", port = " + Integer.toString(port) + " connectionName = " +
|
64
|
39 connectionName + " absName = " + nodeName + "reverseName = " + reverseName + " remoteAbsName = " + remoteNodeName
|
40
|
40 + " cokkie = " + cookie ;
|
|
41 }
|
|
42 }
|