0
|
1 package rep;
|
|
2
|
141
|
3 import remoteeditor.network.REP;
|
|
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, "");
|
0
|
7 public int cmd;
|
|
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
|
|
21 public REPCommand(int cmd,int sid,int eid, int seq, int lineno, int textsiz, String string) {
|
|
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 }
|
0
|
38 public String toString(){
|
|
39 String repCmdString = new String(cmd + "," + sid + "," + eid + "," + seq + "," + lineno + "," + textsiz + "," + string);
|
|
40 return repCmdString;
|
|
41 }
|
|
42
|
|
43 public void setEID(int eid2) {
|
|
44 // TODO Auto-generated method stub
|
|
45 this.eid = eid2;
|
|
46 }
|
|
47
|
|
48 public void setCMD(int cmd2) {
|
|
49 // TODO Auto-generated method stub
|
|
50 this.cmd = cmd2;
|
|
51 }
|
|
52
|
|
53 public void setSID(int sessionID) {
|
|
54 // TODO Auto-generated method stub
|
|
55 this.sid = sessionID;
|
|
56 }
|
1
|
57
|
12
|
58 public void setString(String string2) {
|
|
59 // TODO Auto-generated method stub
|
|
60 string = string2;
|
|
61 }
|
|
62
|
17
|
63 public void setHost(String host) {
|
|
64 // TODO Auto-generated method stub
|
|
65 this.host = host;
|
|
66 }
|
|
67
|
19
|
68 public void setPort(String port) {
|
17
|
69 // TODO Auto-generated method stub
|
|
70 this.port = port;
|
|
71 }
|
75
|
72
|
141
|
73 public void setThroughMaster(boolean f){
|
|
74 this.throughMaster=f;
|
|
75 }
|
|
76 public void setSEQID(int i) {
|
|
77 // TODO Auto-generated method stub
|
|
78 seq = i;
|
75
|
79 }
|
17
|
80
|
0
|
81 }
|