Project

General

Profile

Statistics
| Revision:

root / proj / src / Header.java @ 1

History | View | Annotate | Download (1.25 KB)

1
public class Header {
2
        String messageType;
3
        String version;
4
        int senderId;
5
        String fileId;
6
        int chunkNo;
7
        int replicationDeg;
8
        String CRLF = "\r\n";
9
        
10
        public Header(String messageType, String version, int senderId, String fileId, int chunkNo, int replicationDeg) {
11
                this.messageType=messageType;
12
                this.version=version;
13
                this.senderId=senderId;
14
                this.fileId=fileId;
15
                this.chunkNo=chunkNo;
16
                this.replicationDeg=replicationDeg;
17
        }
18

    
19
        public String getMessageType() {
20
                return messageType;
21
        }
22

    
23
        public void setMessageType(String messageType) {
24
                this.messageType = messageType;
25
        }
26

    
27
        public String getVersion() {
28
                return version;
29
        }
30

    
31
        public void setVersion(String version) {
32
                this.version = version;
33
        }
34

    
35
        public int getSenderId() {
36
                return senderId;
37
        }
38

    
39
        public void setSenderId(int senderId) {
40
                this.senderId = senderId;
41
        }
42

    
43
        public String getFileId() {
44
                return fileId;
45
        }
46

    
47
        public void setFileId(String fileId) {
48
                this.fileId = fileId;
49
        }
50

    
51
        public int getChunkNo() {
52
                return chunkNo;
53
        }
54

    
55
        public void setChunkNo(int chunkNo) {
56
                this.chunkNo = chunkNo;
57
        }
58

    
59
        public int getReplicationDeg() {
60
                return replicationDeg;
61
        }
62

    
63
        public void setReplicationDeg(int replicationDeg) {
64
                this.replicationDeg = replicationDeg;
65
        }
66

    
67
        public String getCRLF() {
68
                return CRLF;
69
        }
70
        
71
}