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){
|
339
|
30 this(cmd.cmd, cmd.sid, cmd.eid, cmd.seq, cmd.lineno, 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(){
|
339
|
48 String repCmdString = cmd + ",sid=" + sid + ",eid=" + eid + ",seq=" + seq +
|
340
|
49 ",lineno=" + lineno ;
|
|
50 if (string!=null) repCmdString += ",sz=" + string.length() +"," + string;
|
0
|
51 return repCmdString;
|
|
52 }
|
|
53
|
|
54 public void setEID(int eid2) {
|
|
55 this.eid = eid2;
|
|
56 }
|
|
57
|
271
|
58 public void setCMD(REP cmd2) {
|
0
|
59 this.cmd = cmd2;
|
|
60 }
|
|
61
|
|
62 public void setSID(int sessionID) {
|
|
63 this.sid = sessionID;
|
|
64 }
|
1
|
65
|
12
|
66 public void setString(String string2) {
|
|
67 string = string2;
|
|
68 }
|
|
69
|
17
|
70 public void setHost(String host) {
|
|
71 this.host = host;
|
|
72 }
|
|
73
|
19
|
74 public void setPort(String port) {
|
17
|
75 this.port = port;
|
|
76 }
|
75
|
77
|
141
|
78 public void setThroughMaster(boolean f){
|
|
79 this.throughMaster=f;
|
|
80 }
|
|
81 public void setSEQID(int i) {
|
|
82 seq = i;
|
75
|
83 }
|
17
|
84
|
0
|
85 }
|