0
|
1 package rep;
|
|
2
|
144
|
3 import rep.REP;
|
141
|
4
|
0
|
5 public class REPCommand {
|
8
|
6 public static REPCommand SMCMD_SESSION_JOIN = new REPCommand(REP.SMCMD_SM_JOIN, 0, 0, 0, 0, 0, "");
|
271
|
7 public REP cmd;
|
0
|
8 public int sid;
|
|
9 public int eid;
|
|
10 public int seq;
|
|
11 public int len;
|
|
12 public int lineno;
|
|
13 public boolean stat;
|
141
|
14 public boolean throughMaster;
|
|
15
|
0
|
16 public String string;
|
|
17 private int textsiz;
|
17
|
18 String host;
|
19
|
19 String port;
|
0
|
20
|
271
|
21 public REPCommand(REP cmd,int sid,int eid, int seq, int lineno, int textsiz, String string) {
|
0
|
22 this.cmd = cmd;
|
|
23 this.sid = sid;
|
|
24 this.eid = eid;
|
|
25 this.seq = seq;
|
|
26 this.textsiz = textsiz;
|
|
27 this.lineno = lineno;
|
|
28 this.string = string;
|
141
|
29 this.throughMaster = false;
|
|
30 }
|
|
31 public REPCommand(REPCommand cmd){
|
|
32 this(cmd.cmd, cmd.sid, cmd.eid, cmd.seq, cmd.lineno, cmd.string.length(), new String(cmd.string));
|
0
|
33 }
|
|
34
|
25
|
35 public REPCommand() {
|
|
36 // TODO Auto-generated constructor stub
|
|
37 }
|
271
|
38 public REPCommand(int cmd, int sid, int eid, int seq, int lineno,
|
|
39 int textsiz, String string) {
|
|
40 this.cmd = REP.newREP(cmd);
|
|
41 this.sid = sid;
|
|
42 this.eid = eid;
|
|
43 this.seq = seq;
|
|
44 this.textsiz = textsiz;
|
|
45 this.lineno = lineno;
|
|
46 this.string = string;
|
|
47 this.throughMaster = false;
|
|
48 }
|
|
49
|
0
|
50 public String toString(){
|
|
51 String repCmdString = new String(cmd + "," + sid + "," + eid + "," + seq + "," + lineno + "," + textsiz + "," + string);
|
|
52 return repCmdString;
|
|
53 }
|
|
54
|
|
55 public void setEID(int eid2) {
|
|
56 // TODO Auto-generated method stub
|
|
57 this.eid = eid2;
|
|
58 }
|
|
59
|
271
|
60 public void setCMD(REP cmd2) {
|
0
|
61 // TODO Auto-generated method stub
|
|
62 this.cmd = cmd2;
|
|
63 }
|
|
64
|
|
65 public void setSID(int sessionID) {
|
|
66 // TODO Auto-generated method stub
|
|
67 this.sid = sessionID;
|
|
68 }
|
1
|
69
|
12
|
70 public void setString(String string2) {
|
|
71 // TODO Auto-generated method stub
|
|
72 string = string2;
|
|
73 }
|
|
74
|
17
|
75 public void setHost(String host) {
|
|
76 // TODO Auto-generated method stub
|
|
77 this.host = host;
|
|
78 }
|
|
79
|
19
|
80 public void setPort(String port) {
|
17
|
81 // TODO Auto-generated method stub
|
|
82 this.port = port;
|
|
83 }
|
75
|
84
|
141
|
85 public void setThroughMaster(boolean f){
|
|
86 this.throughMaster=f;
|
|
87 }
|
|
88 public void setSEQID(int i) {
|
|
89 // TODO Auto-generated method stub
|
|
90 seq = i;
|
75
|
91 }
|
17
|
92
|
0
|
93 }
|