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