-
Notifications
You must be signed in to change notification settings - Fork 0
/
ActualMessage.java
40 lines (30 loc) · 922 Bytes
/
ActualMessage.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
import java.io.IOException;
/* This is the parent class of messages expect handshake message. They have some common features so that they can
interit this calass.*/
public class ActualMessage extends Message {
protected int length;
protected MessageType msType = null;
public ActualMessage(MessageType msType) throws IOException {
this.length = 1;
this.msType = msType;
}
public ActualMessage(int length, MessageType msType) throws IOException {
this.msType = msType;
this.length = length;
}
public int getMsgLength() {
return length;
}
public void setMsgLength(int length) {
this.length = length;
}
public void setMsgType(MessageType msType) {
this.msType = msType;
}
public MessageType getMsgType() {
return msType;
}
public int getMessageLength() {
return this.length;
}
}