-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMessage.java
56 lines (43 loc) · 1.03 KB
/
Message.java
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
package rmi.netflix.server;
import java.io.Serializable;
@SuppressWarnings("serial")
public class Message implements Serializable{
private MessageType _type;
private int _serverelected;
private int _serverid;
private int _numclients;
public enum MessageType {
ELECTION, ELECTED
}
public Message(MessageType type, int elected, int serverid,int numclients) {
this._type = type;
this._serverelected = elected;
this.set_serverid(serverid);
this._numclients = numclients;
}
public Message() { }
public MessageType getType() {
return this._type;
}
public void setType(MessageType type) {
this._type = type;
}
public int getElected() {
return this._serverelected;
}
public void setElected(int elected) {
this._serverelected = elected;
}
public int getNumClients() {
return this._numclients;
}
public void setNumClients(int numclients) {
this._numclients = numclients;
}
public int get_serverid() {
return _serverid;
}
public void set_serverid(int serverid) {
this._serverid = serverid;
}
}