-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathInterestedMessage.java
More file actions
62 lines (45 loc) · 945 Bytes
/
Copy pathInterestedMessage.java
File metadata and controls
62 lines (45 loc) · 945 Bytes
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
public class InterestedMessage implements Message{
private int msg_len;
private int msg_type;
private byte[] msg_payload;
private long serialVersionUID;
public InterestedMessage()
{
this.serialVersionUID = ++serialVersionUID;
}
public void setMsgLen() {
msg_len = msg_payload.length;
}
@Override
public void setMsgPayLoad(byte[] payload) {
msg_payload = payload;
}
@Override
public int getMsgType() {
return msg_type;
}
@Override
public int getMsgLen() {
return msg_len;
}
public byte[] getMsgPayLoad()
{
return msg_payload;
}
public long getUID()
{
return serialVersionUID;
}
public Message getMessage()
{
return this;
}
@Override
public void setMsgPayLoad(){}
public void setMsgPayLoad(int index){}
@Override
public void setMsgType(byte type) {
// TODO Auto-generated method stub
msg_type = type;
}
}